colleague(serioussly I dont use char* 🙂 ) made a bug that reduces to this:
testVar.append('\0'); //testVar is std::string
So he basically this fixes it:
testVar.append("\0");
My question is why first one isnt legal?
Cant it be considered as 0 length 0 terminated string?
I tried going into VS10 std lib implementation to see for myself but I regretted it. 🙂
'creates acharliteral, which is not the same as a string /char *. Some languages treat a single character as a length-1 string, but C++ defines a single character to be a primitive datatype while a string is an array of characters.