My output keeps saying cout does not name a type why ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

My output keeps saying cout does not name a type why ?

I am doing this in c++ coding

20th Feb 2018, 5:43 PM
Ethan Walsh
Ethan Walsh - avatar
3 Answers
+ 8
*shakes Magic-8 Ball* ----"Concentrate and ask again" Well, my Magic-8 Ball wasn't too useful in this situation. Speaking of which, you didn't bother to post your code to us, so asking us why becomes insanely difficult. However, usually that's caused when you're using cout outside of a function, so maybe look in that direction. If you want more specific help, post up your code and I'll correct it for you.
20th Feb 2018, 5:50 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 5
You may have forgotten the line, “using namespace std;”. That is the only possibility I can think of, but it would be easier to help if you post your code.
20th Feb 2018, 7:36 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 2
thankyou for your replies
20th Feb 2018, 8:28 PM
Ethan Walsh
Ethan Walsh - avatar