Thread: Help with understanding arguments of int main()

  1. #16
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    United States
    Well to me it sounds like he had two completely different problems at once, which is why it was so confusing.

  2. #17
    Registered User
    Join Date
    Nov 2011
    @whiteflags Haha sorry if my question was a tad confusing... I do that to people alot. My recent question over the program I posted was asking why it needed:
    "int (argc, char* args[])". And neo1's comment about the program not needing it, but the SDL does, makes sense. Because, SDL in the program is what sets up the GUI, and we want the GUI to invoke the program without the need of a human being ( I'm just now understanding command line paremeters, so my explanation may be very well off).

    Other than that my program works fine, it's just I wanted to understand WHY it wouldn't work without them

  3. #18
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Liverpool UK
    SDL is not a GUI library, An Example may make it appear like that but It does not have built in 'GUI' types, you have to write them, It just provides a layer of access to media devices, It is probably best to research the SDL docs to find out why entry args are required, it could be that they are 'looked for ' and then parsed away if null by default. FLTK is a good GUI library if you are interested in that type of programming.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using arguments in main
    By marlaFC in forum C Programming
    Replies: 10
    Last Post: 12-17-2011, 09:27 PM
  2. Arguments to main
    By codecaine_21 in forum C Programming
    Replies: 17
    Last Post: 10-23-2010, 12:49 PM
  3. arguments to main
    By cantinero74 in forum C Programming
    Replies: 4
    Last Post: 05-27-2010, 10:39 PM
  4. arguments in main
    By cdonlan in forum Linux Programming
    Replies: 3
    Last Post: 01-24-2005, 12:59 AM
  5. Main() arguments
    By Munkey01 in forum C++ Programming
    Replies: 4
    Last Post: 02-08-2003, 09:35 AM