How can we calculate text file size in bytes? Using VC++!
How can we calculate text file size in bytes? Using VC++!
Code:int GetFileSize(const std::string& FileName) { int Size; std::ifstream File; File.open(FileName.c_str(), std::ios::in | std::ios::binary); if(File.fail()) return -1; File.seekg(0, std::ios::end); Size = File.tellg(); File.close(); return Size; }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.