c++ - Why fstream doesn't work with excel.csv -
i trying add data excel fstream csv doesnt work, don't know if doing wrong. here code
#include <iostream> #include <fstream> using namespace std; int main() { ofstream file; file.open("test.csv"); file << "one,two" << endl; file << "three" << " , " << "four\n"; file.close(); return 0; }
the results one,two in cell a1 , three,four int cell b1 edit: expected a1 = 1 a2 = 2 b1 = 3 , b2 = four
Comments
Post a Comment