Compilation of string literals
问题 Why can two string literals separated by a space, tab or "\n" be compiled without an error? int main() { char * a = "aaaa" "bbbb"; } "aaaa" is a char* "bbbb" is a char* There is no specific concatenation rule to process two string literals. And obviously the following code gives an error during compilation: #include <iostream> int main() { char * a = "aaaa"; char * b = "bbbb"; std::cout << a b; } Is this concatenation common to all compilers? Where is the null termination of "aaaa"? Is