From d0b6aa0c6406c0a22404d8999f889242cef54e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=C3=9F?= Date: Wed, 30 Dec 2009 12:37:26 +0100 Subject: Temparray fehler behoben. --- Temparray.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Temparray.h') diff --git a/Temparray.h b/Temparray.h index 72b5068..fe9e91b 100644 --- a/Temparray.h +++ b/Temparray.h @@ -7,11 +7,11 @@ class Temparray { public: - Temparray(float initialtemp, int size0[3]){ - float *temperature = new float[size0[0]][size0[1]][size0[2]][4][6]; - Cubehole *cubearray = new Cubehole[size0[0]][size0[1]][size0[2]]; - tempInit(initialtemp, size0); - size[0] = size0[0]; size[1] = size0[1];size[2] = size0[2]; + Temparray(float initialtemp, int x0, int y0, int z0){ + float *temperature = new float[x0, y0, z0, 4, 6]; + Cubehole *cubearray = new Cubehole[x0, y0, z0]; + tempInit(initialtemp, x0, y0, z0); + size[0] = x0; size[1] = y0; size[2] = z0; } ~Temparray(){ delete[] temperature; @@ -19,7 +19,7 @@ class Temparray } void setTemp(float temp, int x, int y, int z, int direct, int pos){ - temperature[x][y][z][direct][pos] = temp; + temperature[x, y, z, direct, pos] = temp; } void deactivateCube(int x, int y, int z){ for(int i=0; i<4; i++){ @@ -35,10 +35,10 @@ class Temparray Cubehole *cubearray; int size[3]; - void tempInit(float temp0, int size0[3]){ - for(int i=0; i