Hi guys,
something strange (well strange to me...but maybe there is an easy explaination...) happens using the fwrite.
That is to say that used after a fread() works, if i use with an array allocated in memory, it doesn't... why does this happen? is it normal? how to solve it?
Take a look:
CODE
c_pn = fread(pn,sizeof(float),239,f_primary);
c_pw = fwrite(pn,sizeof(float),239,f_out);
like this it works perfectly;
CODE
for(i=0;i<100;i++)
d[i]= i;
c_dw = fwrite(d,sizeof(float),100,f_out);
with this it doesn't work.....
both the arrays, d and pn, are allocated with malloc().
Any clue??
Thx a lot.
Silvia