I forgot I was in the debugger, hit build and the file that I had modified, but not saved is now gone. It was the source file to this header.

I have a backup from a few days ago, but how can I find out why msvc crashed and what I can do to prevent it from happening again?


Code:
class cRenderEngine {
public:
	//Engine Functions
	cRenderEngine();
	~cRenderEngine();
	void Init(HDC i);
	void ClearScreen();
	void Perspective3D(float fov,float near,float far,float width,float height);
	void Perspective2D(RECT);
	void Render3D();
	void Render2D();
	void RenderWireframe();
	void RenderNormal();
	void ResetRenderPosition();
	void LoadCameraPosition();
	void LoadCameraPosition(sVertex3f* eye, sVertex3f* focus);
	void SetRenderPostion(float* m);
	void Translate(sVertex3f location);
	void Translate(float x, float y, float z);
	void Rotate(sVertex3f rotation);
	void DrawModel(unsigned int modelID);
	void BindTexture(unsigned int textureID);
	sTexture* LoadTexture(string path, short size, short size2);	//Loads a texture from file
	sTexture* LoadTexture(float* data, short size, short size2);	//Loads texture from data 
	sTexture* LoadTexture(string path, short size);					//Loads a texture from file
	sTexture* LoadTexture(float* data, short size);					//Loads texture from data 
	sTexture* LoadAlphaTexture(float* data, short size);				//Loads texture from data 
	sTexture* LoadAlphaTexture(float* data, short size, short size2);	//Loads texture from data 
	sTexture* LoadMonoTexture(float* data, short size);					//Loads texture from data 
	sTexture* LoadMonoTexture(float* data, short size, short size2);	//Loads texture from data 
	sModel* LoadTexturedGeometry(list<sTexturedTriangle>* tris, list<sTexturedQuad>* quads, sTexture* tex);	//Creates a display list from the passed polys
	sModel* LoadBasicGeometry(list<sBasicTriangle>* tris, list<sBasicQuad>* quads);		//Creates a display list from the passed polys
	void Screenshot();
	void SwapFrameBuffer();
	void DeleteModel(unsigned int a);
	void ShiftUp(float v);
	void ShiftLeft(float v);
	void PurgeLumps();

	//Primitave Draw Functions
	void ApplyColor(float color[4]);
	void DrawTexturedTriangle(sVertex3f* coords[3], sVertex2f texcoords[3], sVertex3f normal);
	void DrawTexturedQuad(sVertex3f* coords[4], sVertex2f texcoords[4], sVertex3f normal);
	void DrawTriangle(sVertex3f* coords[3], sVertex3f normal);
	void DrawQuad(sVertex3f* coords[4], sVertex3f normal);
	void DrawLine(sVertex3f* coords[2], float size);

	//Utility Functions
	bool PrintSplashScreen();
	void PrintVersion();
	void PrintFPS();
	void PrintTerrainInfo(sTerrainType* ter);
	void PrintLoadingScreen(string title);
	void PrintLoadingScreen(string title, int max);
	bool PrintGoodbyeMessage();
	void PrintDebugInfo();
	void AddDebugInfo(string info);
	void AddDebugInfo(string* info);
	void ClearDebugInfo();
	void DrawCursor(short x, short y);
	void DrawButton(sButton* button, unsigned int tex);
	void DrawLabel(sLabel* label);
	void DrawWheel(cSelectionWheel<sTerrainType*>* terrainWheel);
	void DrawRadar();
	void DrawResources();
	unsigned int CreateTerrainQuad(float* height, sTexture* tex);

	//Setters
	void SetWindowSettings(sWindowSettings* s) { windowSettings = s; };

	//Font Routines
	bool LoadFont(string id_name, string font_name);	//Loads font with name to id
	bool Print(string id_name, string text);					//Prints
	bool Print(string id_name, string text, float x, float y);	//Translates then prints
	void SetupFontSize(short width, short height, short weight);
	void SetFontWidth(short i) { f_width = i; };		//Sets font param
	void SetFontHeight(short i){ f_height = i; };		//Sets font param
	void SetFontWeight(short i){ f_weight = i; };		//Sets font param
	void SetFontItalic(DWORD i){ f_italic = i; };		//Sets font param
	void SetFontUnderline(DWORD i){ f_underline = i; };	//Sets font param
	void SetFontStrikeout(DWORD i){ f_strike = i; };	//Sets font param
	void SetFontCharSet(DWORD i){ f_charset = i; };		//Sets font param
	void SetFontQuality(DWORD i){ f_quality = i; };		//Sets font param
	void ResetFontAttributes();
 
	//debug functions
	void DrawTextureTest(unsigned int tex);

private:
	//Font Functionality
	short	GetFontID(string id_name);		//ID to # matcher function
	string	fontName[MAX_FONTS];			//Font ID's
	long	fontList[MAX_FONTS];			//Font DL's	
	int		f_width,f_height,f_weight;		//Font Attribs
	DWORD	f_italic,f_underline,f_strike;	//Font Attribs
	DWORD	f_charset,f_quality;			//Font Attribs
	int		loadedFonts;					//Font Counter

	//Other
	HDC hdc;
	string buildNumberString;
	string fpsString;
	DWORD splashScreenTimer;
	DWORD fpsTimer;
	DWORD fpsCounter;
	short splashScreenStage;
	float splashScreenColor;
	short loadingScreenType;
	short loadingScreenCount;
	DWORD loadingScreenTimer;
	string loadingScreenString;
	sTexture* defaultTexture;
	unsigned int defaultModel;
	list<sTexture*> loadedTextures;
	list<sTexture*> loadedLumps;
	list<string> debugInfo;
	list<string*> dynamicDebugInfo;

	//perspective params
	double matrix2D[16];
	double matrix3D[16];
	short renderMode;
	RECT view2D;
	float fov3d;
	float near3d;
	float far3d;
	float width3d;
	float height3d;

	sWindowSettings* windowSettings;
};