I have a problem that seems like it should be easy but so far has been fairly difficult to find documentation on... I want to be able to pass parameters to a program in the command line in the same manner as the built in functions (ex. the "/r" in C:\Windows\chkdsk /r). I want my program to be able to accept a parameter, such as "<My Book>", by adding it right after the program name. Could I add multiple parameters? My hope is to produce an index of my bank record books and access it by simply typing something similar to "C:\MyBooks Book_Number_1 Page_Number_31"
I have tried this with no success:
[
#include <iostream>
using namespace std;
int main(int choice1, int choice2)
{
//my program here using choice1 and choice2
return 0;
}
Thanks!