ALright... I have an assingment where in a subfunction I prompt the user to input a filename then I return that filename to my main function where I can then call that filename to other functions.. I was going to use pointers, but I'm still learning how to use em so..
I need help on how to correctly format the prototype
int getFname(int*);
in main
int *tfname;
tfname = getfname();
and heres the function
int getFname(int *)
{
char filename[41];
printf("\n Please Type name of input file with the appropiate extension and press ENTER.\n");
gets(filename);
return(&filename);
}
Thanks
TCD
I need help on how to correctly format the prototype
int getFname(int*);
in main
int *tfname;
tfname = getfname();
and heres the function
int getFname(int *)
{
char filename[41];
printf("\n Please Type name of input file with the appropiate extension and press ENTER.\n");
gets(filename);
return(&filename);
}
Thanks
TCD