Dharmendra
May 16th, 2005, 06:31 AM
hi
i have problem regarding memory allocation.i want to allocate the for 3 such pointer of array. float *a[264],float *b[264],float *[264]. i used this as
for(int i=0;i<264;i++)
{
direc1[i]=new float[296];
if(direc1[i]==NULL)
{
cout<<"There is only"<<i<<"spaces";
getch();
exit(0);
}
for(int j=0;j<296;j++)
{
dirf>>dir;
direc1[i][j]=dir;
}
}
here dirf as file object . when i compile it it compiled successfully.when i ru the it tkaes file name and show the ... There is only 47 spaces.
I am using p4 system with 256 RAM and 40 Gb HDD. PLz any body get the solution plz send it to me
My mail id : dkcool2@rediffmail.com
i have problem regarding memory allocation.i want to allocate the for 3 such pointer of array. float *a[264],float *b[264],float *[264]. i used this as
for(int i=0;i<264;i++)
{
direc1[i]=new float[296];
if(direc1[i]==NULL)
{
cout<<"There is only"<<i<<"spaces";
getch();
exit(0);
}
for(int j=0;j<296;j++)
{
dirf>>dir;
direc1[i][j]=dir;
}
}
here dirf as file object . when i compile it it compiled successfully.when i ru the it tkaes file name and show the ... There is only 47 spaces.
I am using p4 system with 256 RAM and 40 Gb HDD. PLz any body get the solution plz send it to me
My mail id : dkcool2@rediffmail.com