This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using gcc


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]