I m creating a C++ program in Visual C++ 6.0 based on file handling!!
What I want to do is, I want the user to mention the file name during the command line thing!!
i..e if the user types: cl problem1 history.txt
My program opens the history.txt file in reading mode.
The thing is how do I, take this filename as arguement in my program!!
thnx
February 3rd, 2006, 08:21 PM
SirDice
Search your help files for ARGV and ARGC... That'll point your nose in the right direction :D
February 3rd, 2006, 08:32 PM
codenamevirus
hi SirDice
thnx for putting me on the right direction!!
Now, I have created a C++ program in Visual C++ 6.0.
Can u tell me the exact steps that I need to take, so as to be able to execute my program thru the command line.
Thnx
February 3rd, 2006, 08:33 PM
Juridian
Step 1 - Learn to use google
Step 2 - Learn C++
Parsing out arguments given via the command line is usually one of the first few chapters of any book on c++ programming. Finding a tutorial on doing it should be trivial via google.