Splitting 2 MB of datas....
-
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
-
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
What error on what line? That code doesn't look like it would even compile...
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
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
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: