Writing character \ in output

Hello, I am trying to write the character \ using command "cout", here is an example:

cout << " Selection & N($\tau_{h}=0$) & N($\tau_{h}=1$) & N($\tau_{h}=2$) \\ \hline\hline" << endl;

However \ลง just appears like a huge space and \\ just don't appear ...
Any suggestion?


Thanks
Pablo
That's because \ is the escape character. For example, \n will print a new line. \t is a tab I believe.

Writing \\ should work, I'm not sure why it wouldn't. If you're specifying directories, / should work just fine though. I know windows doesnt care, not sure about *nix
THank you, is working perfectly now
Topic archived. No new replies allowed.