美文网首页
65 - Tips for File Handling

65 - Tips for File Handling

作者: 社交帐号直接注册 | 来源:发表于2018-01-10 13:46 被阅读0次
#include <iostream>
#include <fstream>
using namespace std;

int main()
{
    ofstream buckyfile("bee.txt");
    if(buckyfile.is_open())
    {
        cout << "is open" << endl;
    }
    else
    {
        cout << "meassed up" << endl;
    }

    buckyfile << "oi love the bee" << endl;
    buckyfile.close();
}

相关文章

网友评论

      本文标题:65 - Tips for File Handling

      本文链接:https://www.haomeiwen.com/subject/rjlonxtx.html