How can I get a file's size in C++?

QuestionsHow can I get a file's size in C++?
sethbeckerman5 Staff asked 15 years ago

Let's create a complementary question to this one.
What is the most common way to get the file size in C++?
Before answering, make sure it is portable (may be executed on Unix, Mac and Windows),
reliable, easy to understand and without library dependencies (no boost or qt, but for instance glib is ok since it is portable library).


View on Stack Overflow