home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13152 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.8 KB

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