Thread: finding command line operatives

  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,268
    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, 11:41 AM
  2. Finding LCM--Driving me nuts
    By RealityFusion in forum C++ Programming
    Replies: 2
    Last Post: 06-05-2006, 01:23 AM
  3. Finding the lowest number of a certain input
    By theorbb in forum C Programming
    Replies: 26
    Last Post: 04-17-2006, 02: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, 09:06 AM