How to get more than one char in getopt
?
eg -abc option -bcd another_option
My origianl code:
while((opt = getopt(argc, argv, "ild:r:R:")) != -1){
switch(opt){
case 'd': //Do STH
break;
case 'i': //Do STH
break;
case 'l': //Do STH
break;
case 'R':
case 'r': //Do STH
break;
default: return -1;
}
}
However, it is not available for more than one character eg -abc
or -bcd
What should I do for it? Any comment?