I would like to pass a series of 2D-arrays to a function, which then saves it to a file. My "saving function" is as follows: (Question marks indicate I don't know what the hell I am doing.)
void saveArray(double* z(?),double* u1(?),double* u2 (?),double* theta (?), int row, int column) { ofstream output("data.csv"); for(int j=0;j<row;++j) for(int i=0;i<column;i++) { output<<setprecision(32)<<z[j]<<","<<setprecision(32)<<u1[j][i]<<"," <<setprecision(32) <<u2[j][i] <<","<<setprecision(32)<<theta[j][i]<<endl; } z is : z[30000],u1,u2 and theta are [101][30000] 2D-arrays.
Please let me know if this is confusing and I can post the entire code.
/* comments */instead