mardi 25 juin 2019

Can I make a raw literal using cout without defining a string? [on hold]

For example:

std::string s = R"(\this works\)";
std::cout << s << std::endl;
std::cout R<<"(\this won't\)";

In C++11 the first two lines work. But if I want to just use the cout without defining it as a string first, it won't work. I like to know if it is possible

Aucun commentaire:

Enregistrer un commentaire