\n Issues | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
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 Antwort
+ 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