Answers for "raw string from string c++"

C++
1

raw string in c++

#include <iostream>


int main() {

	
	//Display in Multiline using escape character /n
	const char* example2 = "Line1n"
	"Line2n"
		"Line3n"
		"Line4n"
		;
	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();
}
Posted by: Guest on August-06-2020

Browse Popular Code Answers by Language