Fstream fails to create new file

前端 未结 6 1049
梦如初夏
梦如初夏 2021-01-12 22:57

I\'m using a FileManager for a project so that reading and writing is less of a hassle for me. Or would be, if I didn\'t spend all this time debugging it. So, this comfort-c

6条回答
  •  花落未央
    2021-01-12 23:31

    How can I accomplish this?

    std::ofstream file("file.txt");
    file << data;
    

    Isn't that simpler?

提交回复
热议问题