getting special characters

Started by
1 comment, last by slightlywhacked 23 years, 5 months ago
Im doing a text program for dos in c++ (and no, i dont like programming in dos, i just have to for a school project) and i need to print " to the screen.. ? how can i do this when " means stop printing stuff here like cout >> " he said "moo""; it just dosnt work, it will cause an error how can i get around this??
BAHcows go moomoos go cow
Advertisement
hey all you have to do is use the escape sequence, which is just putting a backslash before the quotes (\)
try:
cout >> " he said \"moo\"";
and it will work
oops i meant << not >> (that might be one of your problems too)

This topic is closed to new replies.

Advertisement