Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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(); 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #size #file
ADD COMMENT
Topic
Name
2+7 =