Do notice that backslash '\' is a special character. I've got the impression that one can use forward slash '/' as directory separator in Windows. If not, the hell with it!
Furthermore, if you really work with paths and not just random text, then use C++17's std::filesystem library.