Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 21st, 2006, 4:52 AM   #1
squirrel
Newbie
 
Join Date: Jun 2006
Posts: 11
Rep Power: 0 squirrel is on a distinguished road
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
squirrel is offline   Reply With Quote
Old Aug 21st, 2006, 5:54 AM   #2
sunnypalsingh
Programmer
 
sunnypalsingh's Avatar
 
Join Date: Dec 2005
Posts: 33
Rep Power: 0 sunnypalsingh is on a distinguished road
You can use command line arguments for this
__________________
The only real valuable thing is intuition.
-Albert Einstein
sunnypalsingh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining languages titaniumdecoy Other Programming Languages 12 Jul 13th, 2006 2:03 PM
Passing vectors as arguments Soulstorm C++ 6 Mar 18th, 2006 4:49 PM
checking file existing time to time, in the same time program do other operation myName C++ 3 Mar 13th, 2006 8:39 PM
Arguments in C++ coldDeath C 12 Aug 22nd, 2005 7:18 PM
Comparing arguments to strings layer C++ 2 May 7th, 2005 2:39 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:20 PM.

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