What is the difference between using
float* f;
and
float f[4];
Or are they treated the exact same way? Will using one over the other potentially cause you to run into memory allocation issues? If not, are there ANY situations where they are treated differently?
Don't know if this is relevant, but I'm using the type float* as a function argument. For example:
void myfun(float* f){
f[0] = 0;
f[1] = 1;
f[2] = 2;
f[3] = 3;
}
which compiles and runs fine (I'm not really sure why - I would think that since I didn't allocate any memory to f
that it would throw some kind of exception).