class AiNode;
class AiNodePtr {
AiNode *ai;
};
class AiNode
{
AiNodePtr branches[8];
void SomeFunction()
{
...
branches[0].ai=new AiNode;
}
};
And it''s causing a windows invalid instruction error when it reaches the part where it''s newed. Any ideas?
New troubles
Ok, I have something like this code:
-------------------------------NeXe: NeHe DirectX-style. Follow the orange rabbit.
Your SomeFunction doesn''t happen to be the constructor does it?
Was it a compile error or a run time error?
Was it a compile error or a run time error?
Nope, SomeFunction isn''t a constructor. It''s a run-time error. Weird, eh?
-------------------------------NeXe: NeHe DirectX-style. Follow the orange rabbit.
Very wierd.
Try using sizeof, to see how big each of your classes is.
It almost has to be the case of SomeFunction being activated in a constructor somehow.
How do you declare the first object of the head object?
Try tracing the code into new to see if you end up somewhere in your code (vs microsoft''s.)
I would have to see more code to help more. What you show is fine.
Try using sizeof, to see how big each of your classes is.
It almost has to be the case of SomeFunction being activated in a constructor somehow.
How do you declare the first object of the head object?
Try tracing the code into new to see if you end up somewhere in your code (vs microsoft''s.)
I would have to see more code to help more. What you show is fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement