Pointer Problem
Hello
I have a very basic problem with pointers. Look at this
static void super(point3f *face, WFace *fac)
{
float buffer;
int i=0;
for(;i<=3; i++)
{
buffer = fac.v[0];
face.x = buffer;
}
}
VC++ compiles it, but if I execute it, it says that there is an unhandled exception in the line face.x = buffer. What''s wrong with it. Please help me.
Cheers Jens Jung
</i>
your comparision is <= 3 it should just be < 3
Arrays go from zero up, so a three element array has elements, 0, 1, 2.
Not a pointer problem, a loop problem!
-Mezz
Arrays go from zero up, so a three element array has elements, 0, 1, 2.
Not a pointer problem, a loop problem!
-Mezz
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement