It's very simple. I'm just reserving a space using 'malloc' function as follows,
Sorry, I learned how to use code tag. So I changed my previous and also
fixed a bug which was a typo.
Code:
float *proj;
if((proj = (float *)malloc(proj_size*sizeof(float)))==NULL)
{
printf("Memory allocation failed!\n");
exit(1);
}
fp = fopen("test.dat","wb");
fwrite(proj,sizeof(float),proj_size,fp);
fclose(fp);
That's pretty much it for my code....
And , yes it will not be finished withing a few secs but it doesn't take
more than 10 secs and even it should not take a couple of minutes.
Anyway thanks for replies.