multiline string in c 2b 2b

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

showing results for - "multiline string in c 2b 2b"
Loïc
18 Apr 2020
1#include <iostream>
2
3
4int main() {
5
6	
7	//Display in Multiline using escape character /n
8	const char* example2 = "Line1\n"
9	"Line2\n"
10		"Line3\n"
11		"Line4\n"
12		;
13	std::cout << example2 << std::endl;
14	std::cout << "===================================" << std::endl;
15	// display in multiline using Raw
16	const char* example = R"(Line1
17Line2
18Line3 
19Line4 
20)";//no need to use escape character  /n
21	std::cout << example << std::endl;
22
23	std::cin.get();
24}
25