Thread: A Class question

  1. #16
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    hmmm,odd it works.....*embarresed*.....
    Well now i know this is possible i'l figure it out,
    thank you very much

  2. #17
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    void main() is somewhat valid, but it mostly depends on the compiler. Some compilers might not accept it, mine does (and so does other Borland ones). But it's still not a good habit to get into. And the file isn't any smaller than if it were done the other way.

  3. #18
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by Frobozz
    void main() is somewhat valid, but it mostly depends on the compiler. Some compilers might not accept it, mine does (and so does other Borland ones). But it's still not a good habit to get into. And the file isn't any smaller than if it were done the other way.
    *alarms go off* void main alert! void main alert!

    Read very carefully: void main is not the least bit valid. It is not now, nor was it ever valid C or C++. It only depends on the compiler whether or not it will catch your blatant error. This isn't like some other things like goto that is sometimes acceptable when used correctly; void main is never, ever acceptable.

    Please don't argue this. Just nod your head and accept the fact that you'll never use void main again. Otherwise, you'll provoke everyone on the C Board to come after you quoting the ISO and ANSI standards and the creator of C++. You don't want that. If you'd like to know the many reasons why void main is completely unacceptable, perform a search of this board.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  2. Replies: 8
    Last Post: 10-02-2005, 12:27 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. question about DLL's and class functions
    By btq in forum Windows Programming
    Replies: 2
    Last Post: 02-25-2003, 06:08 AM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM