Consider the following long option declaration:
struct option longOptions{} {
{"userName",1 ,0, 'u'},
{ "active", 0, 0, 'a'},
{ "level", 2, 0, 'L'}, //value from 0.0 to 5.0
{ "rating", 1, 0, 'R'}, //value from 100 to 1000
{ 0,0,0,0}
};
Create a short option string based on the above.
Write a getopt loop to capture all 4 flags. There is not need to verify the result and you may assume any and all declarations.
Document any assumptions you feel necessary.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here