Raw String Literals
Completed
Print the path C:\Users\dev\notes.txt using a C++11 raw string literal R"(...)" so no backslashes need escaping, then print its length.
Input
None.
Output
Two lines.
Example
Output
C:\Users\dev\notes.txt 22
Editor
C++
Hints
Inside R"( ... )" backslashes are taken literally.
Solution explanation
Raw strings are handy for file paths and regular expressions.
Show solution
#include <iostream>
#include <string>
using namespace std;
int main() {
string path = R"(C:\Users\dev\notes.txt)";
cout << path << "\n" << path.size() << "\n";
return 0;
}