0

\n Issues

As part of a tutorial, it told me that if I want words/phrases on different lines, I need to add the "\n" command between each word. When I try to execute it, it fails and I don't know why. Suggestions?

21st Oct 2017, 5:03 AM
awoo_lord
awoo_lord - avatar
1 Odpowiedź
+ 2
"\n" is used as new line when printing an output, you could use std::endl instead like std::cout << "abc" << std::endl << "def" this will print to the console abc def
21st Oct 2017, 5:08 AM
bogdan
bogdan - avatar