Is there anyway to do something like PHP\'s
print << END
yadayadayada
END;
in C++? (multi-line, unescaped, easy-to-cut-and-paste stre
C++11 has raw string literals:
// this doesn't have '\n', but '\\' and 'n'
R"(yada"yadayada\n)"
And if you need those parens, you can do that, too, using whatever you want for an end token:
// the following will be "(yada)(yada)(yada)"
R"END((yada)(yada)(yada))END"
it also works with embedded new lines:
// the following will be "\n(yada)\n(yada)\n(yada)\n"
R"END(
(yada)
(yada)
(yada)
)END"