Thread: newbie problem, could someone say what is wrong with this?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    And remember that main shall always return int (explicitly, as well), and never something else like void, like some tend to use.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by Elysia View Post
    And remember that main shall always return int (explicitly, as well), and never something else like void, like some tend to use.
    I find this sentence confusing to be honest. It is true that the main function must be declared to return an integer, as stated by the previous poster. It is, however, not required to actually have a return statement in this function.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  2. Newbie question: Problem with malloc
    By Ikim in forum C Programming
    Replies: 2
    Last Post: 02-05-2006, 10:11 PM
  3. Newbie in problem with looping
    By nrain in forum C Programming
    Replies: 6
    Last Post: 11-05-2005, 12:53 PM
  4. Newbie with minor problem
    By Dell Boy in forum C++ Programming
    Replies: 4
    Last Post: 05-27-2002, 05:07 PM
  5. newbie problem
    By face_master in forum C++ Programming
    Replies: 7
    Last Post: 05-15-2002, 08:56 AM