So I'm parsing the command line arguments for my rwfs prog. For some reason, it only gets the first "-d" + args. I'm not giving you the actual code within the switch(there is a lot of it). Help appreciated.
for(int i = 1; i<argc; i++)//parse arguments
{
int charc = 0;
switch(argv[i][0])
{
case '-':
charc++;
switch(argv[i][1])
{
}
}//done with all that parsing crap, lets do some work!
Hi,
In windows parse the LPSTR lpCmdLine parameter , There also GetCommandLine functions, In Linux use get_opt family of functions . You code seems to be fine and seems to do whatever you described . It would be helpful if you can show the entire thing . Anyways , try using a debugger to debug even before that.
And fixing your mismatched scope blocks would help too.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]