finding command line operatives

This is a discussion on finding command line operatives within the C Programming forums, part of the General Programming Boards category; How can I check if the -h operator is included in the command line? It also needs to be next ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    24

    finding command line operatives

    How can I check if the -h operator is included in the command line? It also needs to be next to an html filename?

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    One popular method of parsing command line arguments is getopt(), but this is not available on all systems. If all you are looking for is "-h", then it would be easy to just use strcmp() against all the passed arguments.

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    24
    ah genius! thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tools for finding memory leaks
    By stanlvw in forum C++ Programming
    Replies: 4
    Last Post: 04-03-2009, 12:41 PM
  2. Finding LCM--Driving me nuts
    By RealityFusion in forum C++ Programming
    Replies: 2
    Last Post: 06-05-2006, 02:23 AM
  3. Finding the lowest number of a certain input
    By theorbb in forum C Programming
    Replies: 26
    Last Post: 04-17-2006, 03:36 AM
  4. Finding primes
    By starripper in forum C++ Programming
    Replies: 19
    Last Post: 01-14-2006, 04:17 PM
  5. MFC :: Finding Child Window of a CWnd* Object?
    By SyntaxBubble in forum Windows Programming
    Replies: 2
    Last Post: 09-06-2003, 10:06 AM

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