Hello Friends,
I am writing one module in which i need to convert the path of directory (Windows) but the problem is the path is without '\\' means it is separated with single '\' I have tried to write but unable to code when i put condition for checking '\u' and '\U'. If there is any other predefined library which will convert the normal path into valid C path kindly suggest me.If there are any other way to solve this problem kindly share it with me. Thank you.
Escape chararacters have any meaning only when they are stored in string literals: char x[] = "C:\\Hi.txt"
If it stored in file/another strings, escape cheracters are already translated into ASCII characters and you do not need to do anything with them:
1 2 3 4 5 6 7
//file.txt
C:\Hi.txt
//Your code
char y[100];
std::ifstream in(file1.txt);
in.getline(y, 100);
std::ofstream out(y); //We don't need to do anything with y