| | |
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 c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting string strings studio temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






