Z
zwylinux
while ((c = getopt (argc, argv, ":a:")) != -1) {
switch (c)
case 'a':
v_a = 1;
a_list = optarg;
break;
............
............
}
printf ("%s\n", a_list);
the output is:
$./a.out -a aa bb
aa
so bb is missing, but i suppose aa and bb are both arguments of option
-a.
How can I do that?
switch (c)
case 'a':
v_a = 1;
a_list = optarg;
break;
............
............
}
printf ("%s\n", a_list);
the output is:
$./a.out -a aa bb
aa
so bb is missing, but i suppose aa and bb are both arguments of option
-a.
How can I do that?