So usually we do:
Code:
#define FILENAME input.txt
But this project we have to prompt for the filename. I've tried doing:
Code:
printf("Enter the name of the data file w/ extension: ");
scanf("%c", &FILENAME);
But it only scans in the first letter, which I somewhat expected. As far as I can tell, you can't do Strings in C, is this correct?
If someone can please help me, what is the correct way to scan it in?
On a side note, when I'm opening the file with:
Code:
FILE *inp;
inp = fopen( FILENAME, "r" );
I get the warning:
Code:
warning: passing arg 1 of `fopen' makes pointer from integer without a cast
Not as big of a problem, but still an issue.
THANKS!