Something like print END << END; in C++?

后端 未结 8 1728

Is there anyway to do something like PHP\'s

print << END
yadayadayada
END;

in C++? (multi-line, unescaped, easy-to-cut-and-paste stre

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-02 00:10

    You can do like this:

    std::cout << "First line\n"
    "second line\n"
    "third line\n" ;
    

    And that's the best you can do with C++.

提交回复
热议问题