0
How do you print a symbol used as a function w/o it executing the function? Eg, print quotes (" ") or slashes (\) as text?
Symbol printing C++
4 Respostas
+ 2
Did you copy the whole thing?
Only the lines starting with cout are code!
Basically, you only have to put a \ in front of a " and you can output it.
+ 2
By 'escaping' it.
" :
cout << "\"Howdy\" he said";
\ :
cout << "Let's write \\";
0
What lesson is "escaping" in? I attempted to copy-paste your code in its own file, but it said it wasn't a closed expression or something. I'm just learning this, but find I learn better if I learn what I need to know as I go. I haven't run across it yet.
0
No, I thought the " :
was part of it. I will practice escaping to make sure I have it down. Most appreciated. Thank you.