{"title":" EOF\u3092\u8aad\u3093\u3060\u3089eof() == true","provider_url":"https://hatena.blog","height":"190","type":"rich","description":"\u3075\u3080\u3075\u3080\u3002 #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout(\"foo.txt\"); if (!fout.is_open()) { exit(1); } fout << \"ABCDE\"; fout.close(); ifstream fin(\"foo.txt\"); if (!fin.is_open()) { exit(1); } fin.seekg(-1, ios::end); cout << \"eof:\" << boolalpha << fin.eof() << end\u2026","url":"https://so-wh.at/entry/20080523/p5","provider_name":"Hatena Blog","image_url":null,"width":"100%","published":"2008-05-23 00:00:02","categories":["C++"],"author_name":"winebarrel","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20080523%2Fp5\" title=\" EOF\u3092\u8aad\u3093\u3060\u3089eof() == true - so what\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://so-wh.at/","blog_title":"so what","author_url":"https://blog.hatena.ne.jp/winebarrel/"}