a string define question (c++)# Programming - 葵花宝典
t*i
1 楼
为啥第二个是invalid的
valid define:
const std::string hello = "Hello";
const std::string message = hello + ", world" + "!";
invalid define:
const std::string exclam = "!";
const std::string message = "Hello" + ", world" + exclam;
valid define:
const std::string hello = "Hello";
const std::string message = hello + ", world" + "!";
invalid define:
const std::string exclam = "!";
const std::string message = "Hello" + ", world" + exclam;