More Code problems. (Please take a look)

Started by
1 comment, last by RonanHayes 21 years ago
Me again Well I started to convert my project from C to C++ at the start it seemed very daunting but after some help from people on the forums I got to grips with it, now its all a bit messy at the moment anD I seem to have problems and lots of them. But since Im not a C++ head Im not exactly sure what the debug errors are, and worse yet how to actually fix them anyway my code is located in full here: http://www.welcome.ie/ronan/heatOO.zip from what I can gather the error is due to: while(1) { switch(ClassifyPoint(&pos,&PlaneArray[NodeArray[Node].Plane])) { case CP_FRONT: if ( NodeArray[Node].IsLeaf != 0 ) { leaf = NodeArray[Node].Front; DrawTree(leaf); return; } else its saying there is something wrong with Classify poly in the debug mode, Im not sure exactly what it is, (Im a C head and it works fine in C) Im new to C++ 2 days new infact. Anyway if you wouldnt mind looking at my code and recommending how to make my code more effiecient other classes that I could perhaps break the code up into and general C++ and DirectX tips. I would much appreciate it. I would prefer to get it working along the same lines as my C version and then spend the time reworking it all to get it more OO compliant. My origianl C code is located here if you want to see what I''ve done in C and what Im aiming for in C++. http://www.welcome.ie/ronan/heat.zip Thanks for you time and I would appreciate any help.
Advertisement
First, you''re not saying what the problem is.

Is it a compile error?
Link error?
Runtime error?
Segmentation violation?
Incorrect results?

Second, if you''re having problems with correctness, why do you ask people for efficiency advice? Get it correct first. Get it efficient if VTune tells you that you must.
I believe to be an Access Violation (0x004b8734)

Error expression cannot be evaluated


, Im not sure exactly whats wrong. Im trying to figure it out, Im new to C++, very new. And the code that is causing the error works in C.

If you want to take a deeper look and I would much appreciate it the code is available at:

http://www.welcome.ie/ronan/heatOO.zip

Esentailly its a BSP Tree rendered with DirectX.

My main intention is to get this programme to work first and then to obtain efficiency, sorry if it seemed I was jumping the gun.

This topic is closed to new replies.

Advertisement