This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling a program
- From: "Wayne" <dockeen at mchsi dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 24 Jul 2003 19:06:37 -0500
- Subject: Re: Compiling a program
Your code has an issue with it: While you use the correct standard
header notation, you have left out one important detail. cout is
located in the standard namespace, so you either have to add
using namespace std;
to tell the compiler where the name cout is defined or qualify the
name to tell where it comes from, i.e.
std::cout
#include <iostream>
using namespace std;
int main()
{
cout << "Hello";
};
This link will catch you up more fully on standard headers:
http://www.cplusplus.com/doc/ansi/hfiles.html
Wayne