sizeof(CString)
-
Hi, Exactly how much data can a CString contain? I have a large amount of text data to store in 1 CString object. The text is added to the CString object 1 line at a time with a \n\r after each line. The problem is, that when the data gets to a certain point, it all goes away. A small amount of text works fine. Is there a C++ class that will handle a large amount of text in 1 variable? Thanks, Frank
-
Hi, Exactly how much data can a CString contain? I have a large amount of text data to store in 1 CString object. The text is added to the CString object 1 line at a time with a \n\r after each line. The problem is, that when the data gets to a certain point, it all goes away. A small amount of text works fine. Is there a C++ class that will handle a large amount of text in 1 variable? Thanks, Frank
-
Hi, Exactly how much data can a CString contain? I have a large amount of text data to store in 1 CString object. The text is added to the CString object 1 line at a time with a \n\r after each line. The problem is, that when the data gets to a certain point, it all goes away. A small amount of text works fine. Is there a C++ class that will handle a large amount of text in 1 variable? Thanks, Frank
First, it will probably work better if you use "\r\n" instead of "\n\r". I had trouble remembering which one to use until I realized that "\r\n" is like "RN" as in "Registered Nurse". People have asked about the maximum possible size of CString items and I have seen no answer to this question except 2,147,483,647 (2GB; INT_MAX). Since the return value of CString::GetLength is an int, it makes sense that a CString cannot be any larger than the value of an int. So in reality, a CString size is probably limited only to available memory.
-
Hi, Exactly how much data can a CString contain? I have a large amount of text data to store in 1 CString object. The text is added to the CString object 1 line at a time with a \n\r after each line. The problem is, that when the data gets to a certain point, it all goes away. A small amount of text works fine. Is there a C++ class that will handle a large amount of text in 1 variable? Thanks, Frank
-
Hi, Exactly how much data can a CString contain? I have a large amount of text data to store in 1 CString object. The text is added to the CString object 1 line at a time with a \n\r after each line. The problem is, that when the data gets to a certain point, it all goes away. A small amount of text works fine. Is there a C++ class that will handle a large amount of text in 1 variable? Thanks, Frank
Why dont you use CStringList class which is a builtin linklist of CString. You can use it for storing each line in a sepetate element of the CStringlist object. You only have to call object.AddTail(data string) for each element. For more information you can see the detail in the MSDN help.