Original Post
I've had a strange error crop up recently with STL strings. It seems as though strings are getting 4 bytes of junk data inserted into the beginning of it after passing it as a parameter. For example: Function Prototype: void OpenFile(const std::string& strFile) ; Call: OpenFile("SomeFile.txt") ; After stepping through the debugger I can see that 'strFile' contains a string with contents like this: IIIISomeFile.txt (the 'I's all have a little carat over them). I've narrowed the problem down to the string class because if I change std::string& to char* everything works fine. Has anyone seen this before? I'm 99% certain it's not an ASCII/UNICODE problem but I'm not ruling anything out at this point.