Can anyone tell me why this code won't run.
I'm trying to write a code that reads the number of lines in a text file.
\code
#include <stdio.h>
int main (void)
{
FILE *inp;
int count = 0;
inp = fopen("Text.txt", "r");
while (inp != EOF);
{
fscanf (inp, "%[^\n]", &count);
count++;
if(inp == '\n')
count++;
}
printf("The counter is %d", count);
fclose(inp);
return (0);
}