Hi!

I'm working with strings containing file paths with the format:
"C:\Folder1\Folder2\fileName.txt"

The problem is that some methods I'm going to use later (mkdir, etc.) don't like this format and they use:
"C:\\Folder1\\Folder2\\fileName.txt"

So the question is, how can I change character '\' for string "\\" in a string?

I have taken a look to string class, also I've tried with:

replace(str_in.begin(), str_in.end(), "\\", "\\\\") from library <algorithm>

with no success, since replace requires a character, not a string.


Thanks in advance!