PDA

Click to See Complete Forum and Search --> : fstream and argv[]


morgan123
Apr 24th, 2002, 07:21 PM
Hi
i was wondering how you would go about reading files passed in the command line. i don't know how many files there are. also is it possible to read in a string first and then a series of integers.
thanks for any help
Morgan

Wynd
Apr 25th, 2002, 05:49 PM
Well, if you doint main(int argc, char* argv[])argc is the number of arguments passed (0 is the program name). You could use that to see how many files were passed.