I've been using std::ofstream
for writing purposes quite a bit. I open the file, do some operations based on certain conditions and close it.
Let's say that later I want to check if anything is really written into the file or not. There is not is_emtpy() kind of simple check available with std::ofstream
.
One way I thought is of using the stat
way which is independent of std::ofstream
.
Wonder how do everyone else do it?