Serialize
-
I created a CStringArray to hold some text. Whenever I serialize the array, i noticed there are some garbage in the text file. How do I fix this. I want to write carriage returns and newlines. I'm using a CFile object. Thanks
-
I created a CStringArray to hold some text. Whenever I serialize the array, i noticed there are some garbage in the text file. How do I fix this. I want to write carriage returns and newlines. I'm using a CFile object. Thanks
Whenever you want text to appear on new line in file, use "\r\n" in a char type array or CString. e.g. CString m_strLines; m_strLines = "Line1.\r\nLine2\r\n"; I am not clear about the garbage that appeared in the file. Does the garbage characters appear at the end of your data or your data is not saved at all?
-
Whenever you want text to appear on new line in file, use "\r\n" in a char type array or CString. e.g. CString m_strLines; m_strLines = "Line1.\r\nLine2\r\n"; I am not clear about the garbage that appeared in the file. Does the garbage characters appear at the end of your data or your data is not saved at all?
Hi, I have no problems with the carriage and line feeds. I have garbage character in from of all the text strings. ie Text1 Text2
-
Hi, I have no problems with the carriage and line feeds. I have garbage character in from of all the text strings. ie Text1 Text2
This is the class info from Serialize. The Serialize method stores the object info in a binary format, not a text format. If you want to "serialize" your stringarray as a text file, you need to do this manually. onwards and upwards...