+ 2
How can I explicitly show '\n' instead of using it to end line?
For example if I make a code where I use the '\n', such as:{ cout << "to end a line use \n"}, how can I make '\n' appear without it being interpreted by the computer to end line and instead show up on the display box?
5 Antworten
+ 4
use double backslash \\n
+ 2
#include <iostream>
using namespace std;
int main() {
cout<<"\\n";
return 0;
}
+ 2
\\n simple... ;)
+ 2
cout <<"\" <<"n"; or cout <<"\\n";
+ 1
use double backslash \\n