Help with understanding arguments of int main()

This is a discussion on Help with understanding arguments of int main() within the C++ Programming forums, part of the General Programming Boards category; Well to me it sounds like he had two completely different problems at once, which is why it was so ...

  1. #16
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,656
    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
    Posts
    67
    @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
    Location
    Liverpool UK
    Posts
    1,422
    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."

    Stroustrup:
    "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'"

Page 2 of 2 FirstFirst 12
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, 08: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-23-2005, 11:59 PM
  5. Main() arguments
    By Munkey01 in forum C++ Programming
    Replies: 4
    Last Post: 02-08-2003, 08:35 AM

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