Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Splitting 2 MB of datas....

Splitting 2 MB of datas....

Scheduled Pinned Locked Moved Managed C++/CLI
helptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    spalanivel
    wrote on last edited by
    #1

    Hi, In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data) But it was working for minminum (ie 50 KB of datas like 0's and 1's). How to over come this error? Very urgent.. Below is the code... CString strCommand; // Holds 2MB of datas like 0's and 1's... System::String* strDataReceived = ""; strDataReceived = strCommand; __wchar_t split __gc[] = new __wchar_t __gc[1]; split [0] = '\n'; String *strSplitCommand[] = strDataReceived->Trim()->Split (split); Please help.. Reg, Subbu

    M L 2 Replies Last reply
    0
    • S spalanivel

      Hi, In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data) But it was working for minminum (ie 50 KB of datas like 0's and 1's). How to over come this error? Very urgent.. Below is the code... CString strCommand; // Holds 2MB of datas like 0's and 1's... System::String* strDataReceived = ""; strDataReceived = strCommand; __wchar_t split __gc[] = new __wchar_t __gc[1]; split [0] = '\n'; String *strSplitCommand[] = strDataReceived->Trim()->Split (split); Please help.. Reg, Subbu

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      What error on what line? That code doesn't look like it would even compile...

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • S spalanivel

        Hi, In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data) But it was working for minminum (ie 50 KB of datas like 0's and 1's). How to over come this error? Very urgent.. Below is the code... CString strCommand; // Holds 2MB of datas like 0's and 1's... System::String* strDataReceived = ""; strDataReceived = strCommand; __wchar_t split __gc[] = new __wchar_t __gc[1]; split [0] = '\n'; String *strSplitCommand[] = strDataReceived->Trim()->Split (split); Please help.. Reg, Subbu

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, IMO you should not try and split a 2MB string, what you should do is avoid you ever need nor obtain such a string in the first place. It doesn't make sense. Tackle the problem at the producer's side, not the consumer's. :)

        Luc Pattyn

        :badger: :jig: :badger:

        Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

        :jig: :badger: :jig:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups