home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!lclark!harrison
- From: harrison@lclark.edu (Mark Harrison)
- Newsgroups: comp.lang.c++
- Subject: Re: Turbo C++, function prototypes
- Message-ID: <1992Sep1.160816.10309@lclark.edu>
- Date: 1 Sep 92 16:08:16 GMT
- Article-I.D.: lclark.1992Sep1.160816.10309
- References: <1992Aug31.181755.13060@hou.amoco.com> <2262@bigfoot.first.gmd.de>
- Organization: Lewis & Clark College, Portland OR
- Lines: 28
-
- In article <2262@bigfoot.first.gmd.de> jh@first.gmd.de (Joerg Heuer) writes:
- >zpvy0a@hou.amoco.com (Prasad Yalamanchi WWNV x4269 9.125) writes:
- >
- >>I am trying to compile a program on Turbo C++, 3.0 . It gives me the following
- >>error. main () , function prototype missing. Do i need to put in the
- >>'main' function's prototype. >>void main(); was still giving me errors.
- >>Could someone help.
- >
- >main's correct return type is 'int'. Try it. It's always better to write
- >the things You mean explicitly. (Though it should work with the implicit
- >'int'.)
- >
- >J"org.
-
- It should make no difference whether you try 'int' or 'void' as long as
- main() returns the correct value (or doesn't with void.) But I had this
- same kind of problem recently. It came from compiling a program from the
- IDE. In my project window, I listed the lib & obj files to link into the
- project, but forgot to add my program. If you are using the project
- feature, make sure you have included your program that has main() in the
- project window.
-
-
- --
- =============================================================================
- Mark Harrison | "We are the Priests, of the Temples of Syrinx
- harrison@sun.lclark.edu | Our great computers fill the hallowed halls."
- -- Me | -- Rush
-