Ok, I have this program pretty much done but I'm just trying to tweak it up a bit.
I'm writting a commmand line interpreter and trying to get it recognize as few characters as possible for the commands. For example I have:
1 2 3 4 5 6 7 8 9 10 11
if(strcmp(arguments[0],"assemble") == 0)
{
if(argcount!=2)
{
printf("Need exactly one argument! See help for more info.\n");
}
else
{
printf("Assemble SIC program into file %s.\n",arguments[1]);
}
}
I want it to recognize "a" or "assemble" or even "assem" if possible as well as know that "at" is not the assemble command. I tried using strncmp, but can't get it work how I want it to. I appreciate any help or suggestions. If you need to see more of what I have, just let me know.