I want to be able to read text files from the command line. So what I'm trying to do is
1) ./a.out menu1.txt menu2.txt
And let the user choose how many files they want to read from so it could also be
2) ./a.out menu1.txt menu2.txt menu3.txt how do I do that?
menu1.txt
hamburger 5.00
pizza 3.25
chips 2.50
menu2.txt
hamburger 2.00
pizza 2.35
chips 1.50
menu3.txt
hamburger 4.00
pizza 5.35
chips 0.50
This is what I have so far:
#include <fstream>
int main(int argc, char *argv)
{
ifstream inStream;
for (int i = 1; i < argc; i++) {
String menu1 = *argv[i];
String menu2 = *argv[i];
String menu3 = * argv[i];
cout << i << " " << endl;
}
}