Greetz,
i just need a second hand opinion from other people....
say i have a function [-Encrypt Key] but the Key part is optional....
the way i have it layed out now is
so basically check next argument to see if its another argument instead of the key.... if it is then use defualt key, if not then read it and go to next argument....
but i have like 6 arguments and i DO NOT wish to do the following
is there some shortcut or am i stuck with doing this....
i already know about "va_" functions and sprintf but they dont help....
thanks,
DK--
i just need a second hand opinion from other people....
say i have a function [-Encrypt Key] but the Key part is optional....
the way i have it layed out now is
Code:
if (strcmp (argv[i+1], "-InFile /*or another argument*/) == 0)
but i have like 6 arguments and i DO NOT wish to do the following
Code:
if (strcmp (argv[i+1], "-InFile") && strcmp (argv[i+1], "another argument) && and so on)
i already know about "va_" functions and sprintf but they dont help....
thanks,
DK--
Comment