View Poll Results: Which type of C++ coder are you?

Voters
12. You may not vote on this poll
  • int main(int args)

    7 58.33%
  • void main(void)

    5 41.67%
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: int main() vs. void main() - Which do you use?

  1. #11
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    int main is my religion, but I easily falter sometimes

    Never used the exit code for debbuging, always use the debugger
    Never spawned any process either.
    Use it always when posting code for public display.
    Used the parameterized list few times, even a few times when the code is generated like WinMain(something argstring or apphandle).
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  2. #12
    Join Date
    Apr 2004
    Posts
    654
    Rep Power
    0

    Default

    int main() {}

    thats how i do it. i feel a whole lot safer seeing return 0; at the end of main in my programs.
    Praise Ye JAH

  3. #13
    Join Date
    Nov 2002
    Posts
    2,231
    Rep Power
    0

    Default

    Not a professional programmer or anything but when i do program int main() is my way.
    Laptop: HP DV6700t - Core 2 Duo T9300 2.5Ghz, 3GB RAM, Nvidia 8400m GS, 250GB HDD. Ubuntu 12.04 and Windows 7
    Phone: Samsung Galaxy Nexus

  4. #14
    Join Date
    Mar 2004
    Posts
    774
    Rep Power
    0

    Default

    a so much people into the int Main business..
    i always use: void Main()
    I have never found myself in the position were i need main to return a value.
    Nickname: Virus
    Occupation: Software Engineer
    Education: B.Sc. Computer Information Science, Asc. Mass Communication, MCSD, MCSE and CCNA

  5. #15
    Join Date
    Apr 2004
    Posts
    654
    Rep Power
    0

    Default

    One of the reasons y most people stick 2 int main is becuz that is the one that is stressed the most when being introduced to C. i never used void main when i was learning C, i used it in a subject called data structers which was one whole semester after.
    Praise Ye JAH

  6. #16
    Join Date
    Sep 2003
    Posts
    237
    Rep Power
    0

    Default

    as kev1 said in C we're taught to use int main().
    John 3:16

  7. #17
    keroed1 Guest

    Default

    Quote Originally Posted by pogi_2nr
    So the void main()ers are ashamed to make themselves known?
    excuse me hmm lets see no we are not just dont see any point in having
    int main (void)
    {

    return 0;
    }

    whats the point returning zero hmmm how about not return anything

  8. #18
    keroed1 Guest

    Unhappy

    Quote Originally Posted by Virus_NCU
    a so much people into the int Main business..
    i always use: void Main()
    I have never found myself in the position were i need main to return a value.

    fi real me either i have never found reason to use it

  9. #19
    keroed1 Guest

    Default

    Quote Originally Posted by kev1_mc
    One of the reasons y most people stick 2 int main is becuz that is the one that is stressed the most when being introduced to C. i never used void main when i was learning C, i used it in a subject called data structers which was one whole semester after.

    really kev1_mc we have been in the same classes for 3 yrs at college together except for elective and i can swear seh is void main () {} we were taught u sure that u did'nt miss a couple of classes that first semester

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •