#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream oFile; oFile.open("test.csv",ios::out|ios::trunc); oFile<<"属性1"<<","<<"属性2"<<","<<"结果1"<<","<<"结果2"<<endl; oFile<<"010101"<<","<<"1 2 3"<<","<<"32.2 112.3;23.12 23.22;23.14 23.45"<<","<<"1"<<endl; oFile.close(); }
原文地址:https://www.cnblogs.com/jhmu0613/p/9271455.html
时间: 2024-10-19 11:44:39