I have following code:
#include <iostream>
using namespace std;
class Table
{
float time_table[800][600];
// float player_table[800][600];
public:
Table(){}
void out(){
for(int i;i<800;++i){
for(int j;j<600;++j){
time_table[i][j]=0.0;
// player_table[i][j]=0.0;
}
}
}
void change(float x, float y, float time, float player){
time_table[int(x)][int(y)]=time;
// player_table[int(x)][int(y)]=player;
}
void showtime(int i, int j){
cout<<time_table[i][j];
}
// void showplayer(int i, int j){
// cout<<player_table[i][j];
// }
};
int main(){
Table tab;
return 0;
}
and it seems to work. However, when I uncomment all the lines above it crashes. Can somenone explain me why? (I'm using Codeblocks 13.12 with GCC 4.8.1 on Windows) Thanks in advance.