revisiting my quiz

This is a discussion on revisiting my quiz within the C++ Programming forums, part of the General Programming Boards category; It doesn't appear that you return out of the main function at the end of the program. Perhaps a simple ...

  1. #16
    Registered User
    Join Date
    Jun 2010
    Location
    Bakersfield, California
    Posts
    22
    It doesn't appear that you return out of the main function at the end of the program. Perhaps a simple

    Code:
    return 0;
    before your last closing brace may help here.

    Edit:
    Okay, I just re-read your post and you said that it crashes *before* you get your answer. So the ending return statement won't help here - it is a good idea to put it in though.
    Last edited by micahharwell; 07-06-2010 at 05:58 PM. Reason: Re-read the OP for clarification

  2. #17
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    You don't really need a return statement, though. It will return at the end of the function, implicitly.
    To clarify: the program will still work without it, so it's not a bug.
    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.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hi, Quiz C program Assignment updated
    By Eman in forum C Programming
    Replies: 19
    Last Post: 11-22-2009, 03:50 PM
  2. Hi, Quiz C program
    By Eman in forum C Programming
    Replies: 0
    Last Post: 11-11-2009, 03:12 PM
  3. Website tutorials (Pointers quiz)
    By TheUnknownFacto in forum C++ Programming
    Replies: 6
    Last Post: 04-18-2007, 10:58 AM
  4. Try this quiz (just made it with C)
    By voltson4 in forum C Programming
    Replies: 1
    Last Post: 07-11-2003, 06:28 PM
  5. C programming language quiz
    By Trancongan in forum C Programming
    Replies: 7
    Last Post: 04-21-2002, 01:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21