Re: Compiling a program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux