COUT display a Forward Slash..

Hey everyone, hope you're all ok..

New to this site so hey :)

Just a quick simple question for a friday:

in COUT how do I show a forward slash?

1
2
cout << "1/8th";  // DOES NOT WORK..
cout << "1\/8th";   // LOGICALLY SHOULD WORK BUT COMPILER MOANS.. 


Thanks in advance :)

Paul..
THE first line does work...for the second line do this cout <<"1\\/8th";
Ah yes, it does work. That's odd, the complier seemed to format it so there were spaces between which i didn't want so i thought it needed an escape character. Thanks all sorted now :)
GLAD to help....................BEST OF LUCK ...and plz mark your post resolved.CHEERS
How do i mark it resolved?
at the top of ur post , there should be an option to mark as solved.
Topic archived. No new replies allowed.