65 - Tips for File Handling

#include 
#include 
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)