Answers for "how to check size of file in c++"

C++
0

how to check size of file in c++

#include <fstream>

std::ifstream::pos_type filesize(const char* filename)
{
    std::ifstream in(filename, std::ifstream::ate | std::ifstream::binary);
    return in.tellg(); 
}
Posted by: Guest on July-18-2021

Code answers related to "how to check size of file in c++"

Browse Popular Code Answers by Language