only cout gives error | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

only cout gives error

i have to do std::cout << Ā«Hello World!Ā», if only do cout i get an error message

7th Dec 2018, 8:53 AM
Truls Vidnes
Truls Vidnes - avatar
2 Respostas
+ 2
std::cout << Ā«Hello World!Ā» ---> std::cout << "Hello World!";
7th Dec 2018, 9:04 AM
Babak
Babak - avatar
+ 1
If you just want to cout without using std::, then you have to add using namespace std; after your includes. This is auto-generated in the code playground. However I recommend to use it without namespaces. They are sometimes an error source for larger projects, so it's best to not get too used to it...
7th Dec 2018, 9:16 AM
Matthias
Matthias - avatar