Those are command line arguments. You have to add the code to parse those arguments in your program. The first step is to change your main function to look like this:
Code:
int main(int argc, char* argv[])
The argc variable is the number of arguments. The argv variable is an array of C style strings holding each command line argument. The command line arguments are separated by spaces, unless they are in quotes. The first argument is always the program name. So for your example: ./programme.o -var1 value -var2 value_two argc would be 5 and the contents of argv would be:
Code:
argv[0] -> "./programme.o"
argv[1] -> "-var1"
argv[2] -> "value"
argv[3] -> "-var2"
argv[4] -> "value_two"
argv[5] -> NULL
You just have to find a way to look at that data and make sense of it.