65 - Tips for File Handling

2018-01-10  本文已影响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();
}
上一篇下一篇

猜你喜欢

热点阅读