+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 11 to 19 of 19

Thread: Reading Command Line Arguments

  1. #11
    Code Warrior Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Age
    16
    Posts
    2,664
    Blog Entries
    3

    Re: Reading Command Line Arguments

    Thanks everyone
    Code:
     / ___|_   _  ___  ___| |_ 
    | |  _| | | |/ _ \/ __| __|
    | |_| | |_| |  __/\__ \ |_ 
     \____|\__,_|\___||___/\__|

  2. #12
    Guru debtboy is just really nice debtboy is just really nice debtboy is just really nice debtboy is just really nice debtboy is just really nice debtboy's Avatar
    Join Date
    Aug 2009
    Location
    I'm in the... Black Lodge
    Posts
    908

    Re: Reading Command Line Arguments

    Nice +rep
    The owls are not what they seem...

  3. #13
    Code Warrior Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Age
    16
    Posts
    2,664
    Blog Entries
    3

    Re: Reading Command Line Arguments

    Thanks debtboy!
    Code:
     / ___|_   _  ___  ___| |_ 
    | |  _| | | |/ _ \/ __| __|
    | |_| | |_| |  __/\__ \ |_ 
     \____|\__,_|\___||___/\__|

  4. #14
    Code Warrior marwex89 is a glorious beacon of light marwex89 is a glorious beacon of light marwex89 is a glorious beacon of light marwex89 is a glorious beacon of light marwex89 is a glorious beacon of light marwex89 is a glorious beacon of light marwex89's Avatar
    Join Date
    Jul 2008
    Location
    Somewhere that is shorter to write than "In the gloomy shadows of my personal namespace"
    Posts
    10,164
    Blog Entries
    2

    Re: Reading Command Line Arguments

    Can't +rep you, but you did well!

  5. #15
    Code Warrior Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Age
    16
    Posts
    2,664
    Blog Entries
    3

    Re: Reading Command Line Arguments

    Just remember me when you have spread it all around
    Code:
     / ___|_   _  ___  ___| |_ 
    | |  _| | | |/ _ \/ __| __|
    | |_| | |_| |  __/\__ \ |_ 
     \____|\__,_|\___||___/\__|

  6. #16
    Administrator James.H is on a distinguished road James.H's Avatar
    Join Date
    Nov 2009
    Location
    London
    Posts
    694
    Blog Entries
    1

    Re: Reading Command Line Arguments

    Great tutorial, definitley easy to read and understand for a total C noob like me.

    Great job + Rep!

  7. #17
    Code Warrior Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Age
    16
    Posts
    2,664
    Blog Entries
    3

    Re: Reading Command Line Arguments

    Thanks James I'm glad I have helped you out.
    Code:
     / ___|_   _  ___  ___| |_ 
    | |  _| | | |/ _ \/ __| __|
    | |_| | |_| |  __/\__ \ |_ 
     \____|\__,_|\___||___/\__|

  8. #18
    dcs
    dcs is offline
    Guru dcs is just really nice dcs is just really nice dcs is just really nice dcs is just really nice
    Join Date
    Mar 2008
    Posts
    771

    Re: Reading Command Line Arguments

    Quote Originally Posted by Guest View Post
    Any feedback is welcome.
    I just wanted to add this, from a C99 draft:

    If they are declared, the parameters to the main function shall obey the following constraints:
    • The value of argc shall be nonnegative.
    • argv[argc] shall be a null pointer.
    • If the value of argc is greater than zero, the array members argv[0] through argv[argc-1] inclusive shall contain pointers to strings, which are given implementation-defined values by the host environment prior to program startup. The intent is to supply to the program information determined prior to program startup from elsewhere in the hosted environment. If the host environment is not capable of supplying strings with letters in both uppercase and lowercase, the implementation shall ensure that the strings are received in lowercase.
    • If the value of argc is greater than zero, the string pointed to by argv[0] represents the program name; argv[0][0] shall be the null character if the program name is not available from the host environment. If the value of argc is greater than one, the strings pointed to by argv[1] through argv[argc-1] represent the program parameters.
    • The parameters argc and argv and the strings pointed to by the argv array shall be modifiable by the program, and retain their last-stored values between program startup and program termination.

  9. #19
    Code Warrior Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest is a name known to all Guest's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Age
    16
    Posts
    2,664
    Blog Entries
    3

    Re: Reading Command Line Arguments

    Dude, do you spend your free time reading and reviewing the C standard?
    Code:
     / ___|_   _  ___  ___| |_ 
    | |  _| | | |/ _ \/ __| __|
    | |_| | |_| |  __/\__ \ |_ 
     \____|\__,_|\___||___/\__|

+ Reply to Thread
Page 2 of 2
FirstFirst 1 2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Functions With a Variable Number of Arguments
    By dargueta in forum C Tutorials
    Replies: 6
    Last Post: 10-05-2009, 06:22 PM
  2. Python Tutorial - Handling Command Line Arguments
    By ShadenSmith in forum Tutorials
    Replies: 3
    Last Post: 06-29-2009, 09:15 PM
  3. Reading Command line arguments in VB.NET
    By Vswe in forum VB Tutorials
    Replies: 2
    Last Post: 06-06-2009, 08:46 AM
  4. Visual Studio 2008: C# Reading Files
    By Jordan in forum CSharp Tutorials
    Replies: 8
    Last Post: 06-20-2008, 10:54 AM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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