iostream error
Author |
Message |
Scooter341
|
Posted: Wed Apr 27, 2005 9:27 pm Post subject: iostream error |
|
|
I'm using DevC++ as my compiler and the #include <iostream> is failing to define my 'cout' and 'cin' commands and I have no idea why. As soon as it hits the first 'cout' it stops compiling and returns an error saying that it is undeclared. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Wed Apr 27, 2005 9:40 pm Post subject: (No subject) |
|
|
cout, cin and cerr (for error messages) live in the "std" namespace in standard C++. To refer to these variables use std::cout, std::cin, or std::cerr, or, less advisably, include the line "using namespace std;". |
|
|
|
|
|
|
|