#include stdio.h
int filesize(char * filename)
{
FILE *fp;
int lines = 0;
fp = fopen(filename, "r");
while(fscanf(fp, "%*[^\n]\n")!=EOF)
lines++;
return lines;
}
Thursday, August 11, 2005
file length
Subscribe to:
Post Comments (Atom)
Road to my grill day ...
#include stdio.h
int filesize(char * filename)
{
FILE *fp;
int lines = 0;
fp = fopen(filename, "r");
while(fscanf(fp, "%*[^\n]\n")!=EOF)
lines++;
return lines;
}
No comments:
Post a Comment