+ 6
Why is it that when I type, cout <<"/ \"<<endl; in c++ i get an error message
Please explain https://code.sololearn.com/cglSBK2jQSE7/?ref=app
5 Answers
+ 19
\ is used to write escape characters, or characters that can't normally be typed in a string. Ex: A newline (\n), a tab (\t), or double quotes (\").
Because of this, \ also has to be escaped. To print one \, you have to type it twice.
cout << "/\\" << endl;
//Output: /\
+ 3
Unclosed string. cout tries to print \" as ".
+ 1
cool! thx!!!
0
You Must Write #include <iostream> on the top of the Programm
0
And under it you Must Write using namespace std;