Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Can't compile, Tried 2 types of compilers

views
     
nexus-
post Jan 31 2006, 12:23 PM

The intrepid coward
Group Icon
VIP
3,744 posts

Joined: Jan 2003
From: Sydney, Australia



gcc accepts deprecated headers (e.g. ".h" extension headers) with warnings. Have you tried looking at documentation/tutorials on the compilers?
nexus-
post Feb 2 2006, 02:37 PM

The intrepid coward
Group Icon
VIP
3,744 posts

Joined: Jan 2003
From: Sydney, Australia



QUOTE(crapp0 @ Feb 1 2006, 04:10 AM)
No but can't it compile just the same? Seems to me that c++ compilers now aren't friendly towards those who are beginners.

My college computers are most probably using an older version of microsoft c++ compiler since it works without any problems whereas the compilers which i've gotten from the net such as gcc can't compile it. I need a compiler which is able to compile in the c++ code in "old school" fashion.
*
Mainly because gcc is not a C++ compiler? g++ is the GCC (GNU Compiler Collection) C++ compiler, while the actual compiler gcc is the C compiler for GCC. If you are writing pure C code, your "C++" program will still compile though.

This post has been edited by nexus-: Feb 2 2006, 02:38 PM
nexus-
post Feb 6 2006, 06:58 AM

The intrepid coward
Group Icon
VIP
3,744 posts

Joined: Jan 2003
From: Sydney, Australia



QUOTE(astalavista_baby @ Feb 5 2006, 04:17 PM)

Secondly, we do not normally use void main in C++. I don't know why but some compilers just refuse to compile unless I use int main.

Don't blame compilers nowadays. No doubt it's a hassle to beginners but it promotes a standard which eventually will promote good programming ethics within programmers. It's good to go through the hassle from the beginning so that you won't find it a hassle later in your programming career. Just my two cents. smile.gif
*
Strict ANSI conforming compilers won't accept void main due to standards imposed, void main is considered poor programming practice as well as return values are important in all programs to indicate the exit status (e.g. successful or did it exit with errors)

 

Change to:
| Lo-Fi Version
0.0177sec    1.81    6 queries    GZIP Disabled
Time is now: 23rd December 2025 - 11:44 PM