Following is the code which i am running on arr[2000][2000] array:
ifstream inf;
inf.open("ABC1. txt");
for(i=0;i<x;i++ )
{
for(j=0;j<x;j++ )
{
inf>>arr[i][j];
if(arr[i][j]==0)
{
ind[i][j]=0;
}
else
{
ind[i][j]=1;
}
}
}
after running this code arr[][] contains only 0 in all cells ie arr[][]= 0 is
0 0 0 0 0 0 0 0 ............ 2000 times
0 . . . ............... .....
0 . . . ............... .....
0 ............... ..........
0 ............... .........
.
.
.
2000 times
This only happens if size of x is 2000 for x=1000 same code is running fine.
Can you suggest solution for the same.....
Thanks in advance
ifstream inf;
inf.open("ABC1. txt");
for(i=0;i<x;i++ )
{
for(j=0;j<x;j++ )
{
inf>>arr[i][j];
if(arr[i][j]==0)
{
ind[i][j]=0;
}
else
{
ind[i][j]=1;
}
}
}
after running this code arr[][] contains only 0 in all cells ie arr[][]= 0 is
0 0 0 0 0 0 0 0 ............ 2000 times
0 . . . ............... .....
0 . . . ............... .....
0 ............... ..........
0 ............... .........
.
.
.
2000 times
This only happens if size of x is 2000 for x=1000 same code is running fine.
Can you suggest solution for the same.....
Thanks in advance
Comment