| | |
ftell() is returning the wrong position of file why?
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2006
Posts: 38
Reputation:
Solved Threads: 0
Hi,
I have a file of approximately 4.19GB. I want to get the totall size of file using code in VC++, Here is my code
If the file is of small size, ftell() return position correctly and the size is also correct.
If the file is of large size (4.19GB), ftell() return position 4, which is wrong.
It must return 4,190,000,000 etc. some thing like that.
can any one guide me what is the case?
Many Thanks,
--
Regards,
Asif
I have a file of approximately 4.19GB. I want to get the totall size of file using code in VC++, Here is my code
C++ Syntax (Toggle Plain Text)
FILE *fptrSampleVideo = fopen(filename,"rb+"); if(fptrSampleVideo) { fseek(fptrSampleVideo,0,SEEK_END); uncompressedVideoSize = ftell(fptrSampleVideo); }
If the file is of large size (4.19GB), ftell() return position 4, which is wrong.
It must return 4,190,000,000 etc. some thing like that.
can any one guide me what is the case?
Many Thanks,
--
Regards,
Asif
![]() |
Other Threads in the C++ Forum
- Previous Thread: array size declaration after inputs
- Next Thread: Problem grabbing the lowest value in C++
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library linker list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






