This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Using gcc
- To: gcc-help at gcc dot gnu dot org
- Subject: Using gcc
- From: "charles scott" <cpscott at nsu dot edu>
- Date: Fri, 14 Sep 2001 11:42:49 -0400
Hello,
I am new to GNU CC and I have version gcc 3.0.1 running on Solaris 8.
The package seemed to install okay and I added the /usr/local/bin
directory to my path however, when I compile my c++ program it returns
the following message:
`main' must return `int'
Here is the code.
#include <iostream.h>
void main()
{
long number = 0;
cout << "This is a test. " << number << endl;
}
Is there a place where I get some sample c++ code that will compile to
test my install?
Thanks for your assistance.