I have a struct for holding a 4D vector
struct {
float x;
float y;
float z;
float w;
} vector4f
And I'm using a library that has some functions that operate on vectors but take float pointers as their arguments.
Is it legal to call something like doSomethingWithVectors( (float *) &myVector)
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…