checking sizes

Is there a synthax that can check size of file(s) and end process if the size isn't true?I'm sorry if i made some mistakes
Also i tried using google didn't really work well
1
2
3
4
std::ifstream file(filename,std::ios::binary|std::ios::ate);
size_t filesize=file.tellg();
file.seekg(0);
//filesize contains the file size, unsurprisingly. 

http://www.cplusplus.com/reference/iostream/fstream/
Topic archived. No new replies allowed.