I get 4 errors in this method:
Code:
void requestFileName(FILE **fp)
{
char inputFilename[30];
printf("Enter the name of the file to be scanned: ");
scanf("%s", inputFilename);
printf("\n"); // adds a space in between file names and file statistics
*fp = fopen(inputFilename, "r"); // open the file as read-only
}
Code:
Error 1 error C2143: syntax error : missing ')' before '*' c:\users\james doyle\documents\visual studio 2005\projects\programmingassignments\programmingassignments\programmingassignment2inputoutput.c 1
Error 2 error C2143: syntax error : missing '{' before '*' c:\users\james doyle\documents\visual studio 2005\projects\programmingassignments\programmingassignments\programmingassignment2inputoutput.c 1
Error 3 error C2059: syntax error : ')' c:\users\james doyle\documents\visual studio 2005\projects\programmingassignments\programmingassignments\programmingassignment2inputoutput.c 1
Error 4 error C2054: expected '(' to follow 'fp' c:\users\james doyle\documents\visual studio 2005\projects\programmingassignments\programs\p2inputoutput.c 2
I am unsure as to what is causing them. I am pretty sure all syntax is correct. If anyone knows what i did wrong, I would be very appreciative for some assistance.