Displaying a " in the string
-
Hi all, I am trying to display a char string that contains following character: " (one double quote). If I write:
char * c = " some string " ";
Now you see the problem I encounter, The second quote is taken as end of the string. But I want it to be displayed inside the string. So, how can I manage to display: some string " Thanks !
-
Hi all, I am trying to display a char string that contains following character: " (one double quote). If I write:
char * c = " some string " ";
Now you see the problem I encounter, The second quote is taken as end of the string. But I want it to be displayed inside the string. So, how can I manage to display: some string " Thanks !
You use the escape character "\":
char* c = " some string \" ";
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
You use the escape character "\":
char* c = " some string \" ";
"We make a living by what we get, we make a life by what we give." --Winston Churchill
Thanks George !