Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   checking arguments (http://www.programmingforums.org/showthread.php?t=11129)

squirrel Aug 21st, 2006 5:52 AM

checking arguments
 
Hi All,

I have a program which takes a file as an input and does some processing depending upon the type of file passed.
The file types are : abc_txt, abc_ply, abc_cnvinf, abc_laneinfo etc

eg: DoWork [FileType] [File]

./DoWork txt abc_txt (or) ./DoWork cnvinf abc_cnvinf

Now I have to perform a check, like if the type and file do not match it should give an error.

That is it should check if the type and _XXX are same.

How do I proceed doing it?? I have no idea.. can anyone help??

Squirrel

sunnypalsingh Aug 21st, 2006 6:54 AM

You can use command line arguments for this


All times are GMT -5. The time now is 12:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC