I'm currently working on a project that depends on me providing a path to a file (eg. C:\Path.pth). Now, I had everything working yesterday by calling my std::string with:
std::string path(`"C:\\Path.pth`");
But now it doesn't work. It throws a bad_alloc. Seems like the '\' character is the problem. I even tried using \x5C as the ascii-value of it instead, but same result.
Now, my question is, is it possible that I have screwed up some #define, some compiler-option or something else "non-code" that could've caused this? I'm using VS 2005.
Any help would be much appreciated
PierreBdR
.. That sounds very likely. Or at least, it have to :P
Since no one have mentioned some kind of /SetStringCharSize:2bit-compiler option, I think it's safe to assume that my code has to mess something up, somewhere, and that it's not just a silly compiler-option (or similar) that's wrong..