I declared a non pointer variable to use as a buffer for my fread
function in C. fread
specifies that the buffer should be a pointer, I used the &
sign to point at the address of my variable buffer
(if my logic is correct). I'm wondering, if it's a good idea to use &
to point to the address of a normal variable. I'm not sure if this practice could be a 'bad' thing / habit that I should avoid. thanks a lot.
int16_t buffer;
fwrite(&buffer, (size_t) sizeof(int16_t), (size_t) 1, output);