char memSim[11] = "AT+CPMS=""SM""";doubled quotes would do something a bit different
For the curious, what happens when you use doubled quotes with gcc is that the compiler sees two strings, and automatically concatenates them into a single string in the binary. This is particularly useful when you're trying to construct very long strings:
char *poem = "I think that I shall never see\n"
" A matrix lovely as a tree\n"
"Trees are fifty times as fun\n
" As structures ala PL/1";
Since the compiler mostly ignores whitespace/newlines, and the final string gets only the material from between the quotes, you can format your source code to look like the string should look when its finally printed. (Of course, you can also mislead yourself and have them NOT match. Leaving out the "\n"s is common...)
Hey joy*C*e_kilmer, you missed a quote on line three of your poem. :)
I heard that the original reason for gluing C string literals was to support concatenation with the preprocessor. For example,
#define MODEL [glow]"Frappinator"[/glow]
#define VERSION [glow]"2.43"[/glow]
const char* message = [glow]"Revoco "[/glow] MODEL [glow]", version "[/glow] VERSION [glow]"\n"[/glow]
[glow]"All Rights Reserved."[/glow];