printf("\n enter your choice\n 1 to ask user for the size of game board\n 2 tp get input from a file\n");
scanf("%d",&choice);
if(choice==1)
{
printf("\n enter number of rows and columns");
scanf("%d%d",&row,&col);
mat=(char**)malloc(row*sizeof(char));
label=(char**)malloc(row*sizeof(char));
for(i=0;i<row;i++)
{
mat[i]=(char*)malloc(col*sizeof(char));
label[i]=(char*)malloc(col*sizeof(char));
}
for(i=0;i<row;i++)
{
for(j=0;j<col;j++)
{
temp=rand()%5;
mat[i][j]=color_codes[temp];
label[i][j]=' ';
}
}
}
this C Language statements is running fine on my visual studio IDE, but when i try to run this same statements on CODE BLOCKS IDE this thing suddenly crashes .Any kind of help will be highly appreciated