I recently learned the command-line argument from my book, and I understand that both of argc and argv. HOWEVER, I don't know when I will use them and for what purpose??? I appreciate if anybody can help me!!:sad:
doraemon
0
Newbie Poster
Recommended Answers
Jump to PostIt is used when you want to control your program from the command line. Rather than promting the user for input, say for example entering a filename, you can use a switch like
-f filename.txt
and that will be all the program needs for execution. The command line arguments are …
Jump to PostSo, if I want to test some program from the command-line, should I always include for example like this part in my program?
int main( int argc, char * argv[]) a = atof ( argv [1] ); b = atof ( argv [2] );
Those things are included …
All 5 Replies
WolfPack
491
Posting Virtuoso
Team Colleague
doraemon
0
Newbie Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
WolfPack
491
Posting Virtuoso
Team Colleague
doraemon
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.