File size

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
TheMan
Posts: 10
Joined: Tue Jan 03, 2006 9:29 am

File size

Post by TheMan »

I've been attempting to figure out how to find the file size of a file using C. I've been searching around here, and on google, but to no avail. Could anyone help me out? I'm completely lost.
hitchhikr
Posts: 83
Joined: Sat Feb 04, 2006 3:33 pm

Post by hitchhikr »

Code: Select all

	int File_Size;
	FILE *fInput;

	fseek(fInput, 0, SEEK_END);
	File_Size = ftell(fInput);
	fseek(fInput, 0, SEEK_SET);
Post Reply