Also, argv should be a const char*
not a char*
. There are two main ways to process command line arguments. One is to loop from 1 to argc and process each argument (old style). The other is to call the function getopt()
for each supported argument. These days, the preferred method is to use getopt()
, though I must confess to usually using the old style, simply because of 30 years of bad habits! :-)
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
SerbOz commented: thanks rubberman. that's works! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
nitin1 commented: true!! +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster