Problems while writing decimal doubles onto a .csv file C++ -
i have program reads test .csv file row row , gives standard deviation & mean of every row. goes on write new .csv file including sd, average, , original values of every row. #include <iostream> #include <string> #include <fstream> #include <sstream> #include <stdlib.h> #include <math.h> #define rows 100 #define columns 11 using namespace std; void read(int data[rows][columns]) { string str; ifstream ifile; string filename="testdatain.csv"; ifile.open(filename); if (ifile) { int = 0; while (getline (ifile,str)){ stringstream ss(str); string temp; for(int j=0;j<columns;j++){ getline(ss,temp,','); data[i][j]=atoi(temp.c_str()); } i++; } cout << "finished reading data." << endl; }else { cout << "error reading." <<endl; ...