Raw string literals are used in C++ to avoid using escape characters. They can be used to express all types of string literals. A raw string literal enables you to express a string without having to perform extra construction or conversion steps.
For example, if you want to express a string that contains a backslash, you can use a raw string literal to avoid having to escape the backslash.
const char* const src = "this is a \"string\"";
const std::string str = "This is a string with a backslash: \\";
const char* const src = R"lit(this is a "string")lit";
const std::string str = R"(This is a string with a backslash: \)";