|
From: Ramana K. <ra...@my...> - 2002-07-03 16:22:16
|
maybe try using just "cout" instead of "std::cout" after you have said "us=
ing std::cout;" already. also, why have you included stdlib.h? you don't =
need it and you should use cstdlib if you do need it, i think. (not exact=
ly an expert... lol)
-----Original Message-----
From: "Napoleon Ahiable" <nah...@so...>
To: <dev...@li...>
Date: Sat, 29 Jun 2002 16:21:01 +0100=20
Subject: [Dev-C++] Error using std::cout
Hello,
I just tried to compile this program and I had an error saying cout not dec=
lared:
#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
|