This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: console out not working
- From: LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com>
- To: ehab samir aziz <hpy_azizy at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 09 Jul 2003 11:49:20 -0700
- Subject: Re: console out not working
- References: <20030704162528.33468.qmail@web41111.mail.yahoo.com>
- Reply-to: gcc-help at gcc dot gnu dot org
ehab samir aziz <hpy_azizy@yahoo.com> writes:
> there is aproblem os using the command cout under gcc.
> How I use it . What is the name of the header file /
In ISO C++98 (that is, as of 5 years ago), cout is used like this:
#include<iostream>
#include<ostream>
int main()
{
std::cout << "Hello!" << std::endl;
}
This example compiles correctly under every version of gcc >= 2.95 .
If you were not taught about namespaces, or about std::, which is the
namespace all standard library functions and objects are in, your
book or instructor has cheated you.
(If this is not your problem, please post a better description of your
problem. )