What would be the most painless way to input un-escaped characters sequence to std::string
?
Instead of
std::string st = \"C:\\\\program
C & C++ only supports using \ to escape strings, and you have to use it. If you have a bunch of paths to work with, I'd suggest opening them in an editor and doing a bulk replacement of \ with \\.
For filenames, just use (forward? back?) the other direction slash. It works on Windows too:
std::string st = "C:/program files/myFile.txt";
You can do it with C++11 raw string literals:
std::string st = R"(C:\program files\myFile.txt)";