I am new to C ++, I have encountered this inequality with const std :: string assignment
This works fine: const std :: string hello = "hello"; Const std :: string message = hello + "world";
This gives the compiler error: const std :: string message = "Hello" + "world";
I do not
nobody is operator + which takes two points type You can: or even: < P> Thanks
const char * and returns a new array of letters in which they point to
std :: string message = std :: string ("hello") + "world";
std :: string message = "hello" + std :: string ("world");
No comments:
Post a Comment