Sign in to follow this  

GNU compiler bug for Dev cpp.

This topic is 4834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I’ve ran into a very strange bug while developing my in-house CAD program SpecialED. In the program I draw a grid for window in the spcific view like this: Void DrawGrid(HWND hWnd, VIEWPORT* View, BYTE cPlane){ FVERTEX3D Min,Max; Clear window Validate Client area blah blah Switch(cPlane){ case PLANE_XZ: Min = Vew.GetMin(); // simply inline return &Min Max = Vew.GetMin(); // simply inline return &Min At this point Min And Max are fine and uncorupted Break; case PLANE_XY: Min = Vew.GetMin(); // simply inline return &Min Max = Vew.GetMin(); // simply inline return &Min At this Min And Max contain corrupted data? break; each other case statemt the data was progressively more corrupted . … } // Switch }; The Problem was in the construtor of the SpecalEdApp class SPECALEDAPP(){ FrontViewPort.SetSize(100,100,0); FrontViewPort.SetCenter(0,0,0) … same for the others … the lines above curropted everything in the constructor. } void SetCenter(float x , float y, float z){ Center.x = x; Center.y = y; Center.z = z;} void SetSize(float x , float y, float z){ Min.x = x Min.y = y Min.z = z Min -= Center; Max.x = x Max.y = y Max.z = z Min += Center; } I so put the definitions in the implimation module and everything worked fine. Very strange anyone else have this sort of problem?

Share this post


Link to post
Share on other sites

This topic is 4834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this