Search:
Forum
Beginners
cin, cout & enld not in scoope
cin, cout & enld not in scoope
Nov 24, 2014 at 4:02am UTC
Cricardo
(6)
What em I doing wrong
#include <iostream>
int main ()
{
int t = 0, value = 0;
while (cin>>value)
t+= value;
cout << "the value of t is: " <<t<<endl;
return 0;
}
Nov 24, 2014 at 4:06am UTC
danghotties
(34)
You're using the std namespace without telling the compiler you are.
You can either write
using
namespace
std;
just after your #include, or you can write
std::cin
,
std::cout
,
std::endl
.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs