0
why "" when inputing \n
i was wondering why i need to put \n in "" and not just a plain break?
1 Odpowiedź
+ 5
Because you are sending a newline character which must be processed as part of a string. *Note* you can also use endl for the same result.
Example:
std::cout << "Hello World" << endl << "This is on a new line";
This is the same as
std::cout << "Hello World\nThis is on a new line";