c++ raw string
//EXAMPLE
std::string sRaw = R"(aaa\ttt %)"; // aaa/ttt %
std::string sNonRaw = "aaa\ttt %"; // aaa tt %
std::cout << sRaw << "\n";
std::cout << sNonRaw << "\n";
//SYNTAX
// R"(<string-with-raw-values>)"
// R"(...)"
c++ raw string
//EXAMPLE
std::string sRaw = R"(aaa\ttt %)"; // aaa/ttt %
std::string sNonRaw = "aaa\ttt %"; // aaa tt %
std::cout << sRaw << "\n";
std::cout << sNonRaw << "\n";
//SYNTAX
// R"(<string-with-raw-values>)"
// R"(...)"
raw string in c++
#include <iostream>
int main() {
//Display in Multiline using escape character /n
const char* example2 = "Line1\n"
"Line2\n"
"Line3\n"
"Line4\n"
;
std::cout << example2 << std::endl;
std::cout << "===================================" << std::endl;
// display in multiline using Raw
const char* example = R"(Line1
Line2
Line3
Line4
)";//no need to use escape character /n
std::cout << example << std::endl;
std::cin.get();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us