#include<fstream>
ofstream open("xy.csv", ios::out | ios::trunc);
open << "x:" << "," << "y:" << endl;
open.close();
包含fstream头文件即可,“,”换列,endl换行
#include<fstream>
ofstream open("xy.csv", ios::out | ios::trunc);
open << "x:" << "," << "y:" << endl;
open.close();
包含fstream头文件即可,“,”换列,endl换行