Hello,
I declared a struct for some options that shall be filled by command line arguments or by reading an input file:
struct options {
int val1;
int val2;
bool val3;
}
Now I want to check for the correct number of arguments at execution of the program. Sure thing a
const int optionsSize = 3;
would do. But is there any adaptive way? What if I add another value into the struct and don't remember to increase the integer?