|
From: Ioannis V. <no...@ho...> - 2002-06-29 16:06:38
|
I found no errors, the code is ok. How did you try to compile it? Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Napoleon Ahiable Sent: Saturday, June 29, 2002 6:21 PM To: dev...@li... Subject: [Dev-C++] Error using std::cout Hello, I just tried to compile this program and I had an error saying cout not declared: #include <iostream> #include <stdlib.h> using std::cout; class World { public: World (int i) { std::cout << "Hello from " << i << ".\n"; } ~World () { std::cout << "Good bye.\n"; } }; World TheWorld (1); int main() { World myWorld (2); std::cout << "Hello from main!\n"; } I'll appreciate any help you can give me. Napoleon. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/02 |