编辑代码

#include <iostream>
#include <string>
using namespace std;
int main() {
    
    string str="D:\hello\world\test.text";  // \代表转义字符
    cout <<str<<endl;
    string str1="D:\\hello\\world\\test.text";
    cout <<str1<<endl;

    string str2=R"(D:\hello\world\test.text)"; //新特性,用括号括起来。
    cout <<str2<<endl;

    string str3="<html>   \
                <head> \
                <title> \
                海贼王   \                         
                </title>  \
                </head>   \
                <body>    \
                ......";       //旧版本需要用\连接。

    cout<<str3<<endl;

    string str4=R"( <html>  
                <head> 
                <title> 
                海贼王                        
                </title>  
                </head>   
                <body>    

    )";
    cout<<str4<<endl;

    //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
	cout << "Hello JSRUN!   \n\n         - from C++ ." << endl;
	return 0;
}