c 2b 2b string on multiple lines

Solutions on MaxInterview for c 2b 2b string on multiple lines by the best coders in the world

showing results for - "c 2b 2b string on multiple lines"
Yuri
20 Feb 2017
1std::string firstWay =
2  "This text is pretty long, but will be "
3  "concatenated into just a single string. "
4  "The disadvantage is that you have to quote "
5  "each part, and newlines must be literal as "
6  "usual.";
7
8//or you can place a \ char just before the end of the line
9std::string secondWay =
10  "Here, on the other hand, I've gone crazy \
11and really let the literal span several lines, \
12without bothering with quoting each line's \
13content. This works, but you can't indent."
Ilaria
07 Nov 2020
1How to cin c++
2