I did a program with the basics, and I can read all the lines:
Code:
#include <stdio.h>
#include <stdlib.h>
#define MYFILE "c:\\Netlog.txt"
int main(void)
{
FILE *fpIn;
int nLine = 0;
char buf[BUFSIZ];
//lets open the file, if have errors, print out
if ((fpIn = fopen(MYFILE,"r")) == NULL) {
perror("Open: ");
return (EXIT_FAILURE);
}
//read the file until the end
while (fgets(buf,sizeof(buf),fpIn) != NULL) {
printf("Line number %3d: %s\n",nLine,buf);
nLine++;
}
//close the file and exit the program
fclose(fpIn);
system("PAUSE");
return 0;
}
Can you explain me, what is vpin, vtypeof, I guess the problem is on that part.