Using += with CString - problem
-
I am having major problems adding strings to the end of a CString with +=. Instead of just copying in the text I get a load of ganumph at the end of the string I don't want - e.g. here is one line of text that was produced - ÍÍÍÍÍÍÍÍÍÍýýýý««««««««îþîþ. Why do I get all this rubbish at the end? How do I get rid of it?
-
I am having major problems adding strings to the end of a CString with +=. Instead of just copying in the text I get a load of ganumph at the end of the string I don't want - e.g. here is one line of text that was produced - ÍÍÍÍÍÍÍÍÍÍýýýý««««««««îþîþ. Why do I get all this rubbish at the end? How do I get rid of it?
Is the string you are adding NULL terminated? as a test set the last location of the string you are adding to NULL
"Laughing at our mistakes can lengthen our own life. Laughing at someone else's can shorten it." - Cullen Hightower
-
I am having major problems adding strings to the end of a CString with +=. Instead of just copying in the text I get a load of ganumph at the end of the string I don't want - e.g. here is one line of text that was produced - ÍÍÍÍÍÍÍÍÍÍýýýý««««««««îþîþ. Why do I get all this rubbish at the end? How do I get rid of it?
-
I am having major problems adding strings to the end of a CString with +=. Instead of just copying in the text I get a load of ganumph at the end of the string I don't want - e.g. here is one line of text that was produced - ÍÍÍÍÍÍÍÍÍÍýýýý««««««««îþîþ. Why do I get all this rubbish at the end? How do I get rid of it?
problem is in your code somewhere, CString is OK. only thing which may cause trouble is operator = of CString cheers includeh10
-
problem is in your code somewhere, CString is OK. only thing which may cause trouble is operator = of CString cheers includeh10
hain i didn't think soo. i know csting is most persistent calss in vc++. pls give me your exact problem i will see to it and post reply thanks I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk