0

Not working for me

So I tried this code and it keeps giving me an error, saying "that cin was not declared in this scope" is anyone else having this problem?

31st Oct 2019, 11:38 PM
Kenneth Robinson
Kenneth Robinson - avatar
3 Answers
0
Can you post the code?
31st Oct 2019, 11:41 PM
Odyel
Odyel - avatar
0
well now it's working, i'm not sure why i got the error and i rewrote the code the same way and it works. { int num = 1; int number; int total = 0; while (num <= 5){ cin >> number; total += number; num ++; } cout << total << endl; }
31st Oct 2019, 11:53 PM
Kenneth Robinson
Kenneth Robinson - avatar
0
Hmm, well I'm happy it works now
31st Oct 2019, 11:59 PM
Odyel
Odyel - avatar