Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

slightlywhacked

getting special characters

This topic is 6470 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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??

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
oops i meant << not >> (that might be one of your problems too)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!