String literals C++?

后端 未结 4 392
误落风尘
误落风尘 2020-12-10 13:08

I need to do the following C# code in C++ (if possible). I have to const a long string with lots of freaking quotes and other stuff in it.

const String _lit         


        
4条回答
  •  感动是毒
    2020-12-10 13:15

    There is no equivalent of C#'s "@" in C++. The only way to achieve it is to escape the string properly:

    const char *_literal = "I can use \"quotes\" inside here";
    

提交回复
热议问题