ok so
Code:
void main (int argc, char *argv[])
did the trick. but now my other problem is taking the arguments, and comparing it to other strings and doing something when they're equal. have i done correct use of pointers? argv is a pointer isnt it?
Code:
void main (int argc, char** argv[])
{
int n;
char *inputVar;
char *initInput;
char *turnInput;
char *simInput;
//resolveCommandLineInput(argc,argv);
printf("\n %s",argv[1]);
initInput = "-i";
turnInput = "-t";
simInput = "-s";
if (argc > 2)
{
helpDisplay();
}
inputVar = argv[0];
printf("\n %s", inputString);
printf("\n got to begining of if statements");
printf("\n %s %s %s %s",&inputVar,&initInput,&turnInput,&simInput);
if(strcmp(inputVar,initInput) == 0)
{
printf("\n init input given");
}
else if(strcmp(inputVar,turnInput) == 0)
{
printf("\n turn input given");
}
else if(strcmp(inputVar,simInput) == 0)
{
printf("\n sim input given");
}
else
{
printf("\n Got here");
}
printf("\n got to end of the if statements");