I have (to me) a strange problem.
I have a vector of CStrings
I wish to remove the last String from the vector and add it to another string.
Simple enough I thought.
If I run the code as above (and step through in debugger) then although last does contain a value, it does not add it to myString.
If I do myString += *last; then it adds the first letter of last to the string.
I have had this issue before, and cant remember how I solved it, so rather than waste anymore time going mad, can anyone else out there hit me with a plank of the blindingly obvious and tell me whats wrong?
Ta.
K
I have a vector of CStrings
I wish to remove the last String from the vector and add it to another string.
Code:
//Retrieve the last good string
CString &last = ptrVec->back();
//Add to the existing CString object
myString += last;
Simple enough I thought.
If I run the code as above (and step through in debugger) then although last does contain a value, it does not add it to myString.
If I do myString += *last; then it adds the first letter of last to the string.
I have had this issue before, and cant remember how I solved it, so rather than waste anymore time going mad, can anyone else out there hit me with a plank of the blindingly obvious and tell me whats wrong?
Ta.
K