hay
I have a problem with the following read in procedure:
this gives an error to me. If I use only 5 columns in the file output_file3.txt it is working, so the problem is connected to the number of colums... ???Code:ifstream widthfile("data-files/output_file3.txt"); while((widthfile >> x[n] >> y[n] >> z[n] >> vx[n] >> vy[n] >> vz[n] >> mass >> type[n])){ if(xmax < x[n]) xmax = x[n]; if(ymax < y[n]) ymax = y[n]; if(zmax < z[n]) zmax = z[n]; n++; } widthfile.close();
I can avoid the problem if I read only one data set and distribute it afterwards like
but this is very ugly... I would like to know what is my mistake withe the procedure above.Code:ifstream widthfile("data-files/output_file3.txt"); while((widthfile >>dummy)){ if(n%0 == 0){ x[n1] == dummy; n1++; } .... n++; } widthfile.close();
thanks for any help
florian



LinkBack URL
About LinkBacks


