Possible Duplicate:
Using C++ filestreams (fstream), how can you determine the size of a file?
file size in c program
I want to retrive the size of a file and for this I implemented in this way
(void)fseek(m_fp, 0, SEEK_END); // Set the file pointer to the end of the file
pFileSize = ftell(m_fp); // Get the file size
(void)fseek(m_fp, oldFilePos, SEEK_SET); // Put back the file pointer at the original location
This is not feasible for out need and is ther anyother way to get the file size or check whether the file contain and data