I have read a text file to console and printed the file after reading,
int textLength=0
int c;
int c;
FILE *file;
file = fopen("ModestProposal.txt", "r");
if (file)
{
while ((c = getc(file)) != EOF)
putchar(c);
//fclose(file);
}
textLength = strlen(c);//get the length of the text
How come I can not strlen "c" ? aren't they both int? I'm getting a warning error saying argument of type "int" is incompatible with the perimeter of type const char. Any way to grab the text from the text file as a whole int ?