0

how to print \ and \n in c++

why we have to add another \

24th Jan 2017, 11:11 AM
Shivam Raghuwanshi
2 Respostas
+ 1
try scaping the \ adding another the \. It would be \\ and \\n.
24th Jan 2017, 11:06 AM
Kleber Leal
Kleber Leal - avatar
- 1
try it:-) #include <iostream> using namespace std; int main() { cout << "\\ and \\n"; return 0; } //I think now it's true...;-)
24th Jan 2017, 11:19 AM
ㅤ Tweetu 😆 ㅤㅤ
ㅤ  Tweetu 😆 ㅤㅤ - avatar