can anyone explain about assertion failure. i cant seem ti fix my problem with this error. it comes out when i try to load a file.

here part of the code

BDLL fileHandle::load()
{	
	char fileN[MAX_PATH]="";
	
		OPENFILENAME ofn;
		ZeroMemory(&ofn, sizeof(ofn));
		ofn.lStructSize = sizeof(ofn); 
		
	   	ofn.lpstrFilter = "Bitmap Files (*.bmp)\0*.bmp";
		ofn.lpstrFile = fileN;
		ofn.nMaxFile = MAX_PATH;
		ofn.Flags =OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
		ofn.lpstrDefExt = "bmp";
		
		if(GetOpenFileName(&ofn))
		{
			FILE* fr=0;
			fopen(fileN, "rb");
			if(fr==NULL)
			{
					fclose(fr);
			}
			else
			{

				fread(&bfih.bmfh, sizeof(BITMAPFILEHEADER), 1, fr);
				fread(&bfih.bmih, sizeof(BITMAPINFOHEADER), 1, fr);
				bfih.pix= new PIX[bfih.bmih.biSizeImage/3];
				fread(bfih.pix, bfih.bmih.biSizeImage, 1, fr );
					fclose(fr);
			}
		
		
		}			
						
					
	
	

   return bfih;
};

my bad.. hehehe

i forgot to

fr=fopen;

what does all this mean how do I debug the assertion.................I need a step by step remedy..................where do I use those formulas at.......... please help me....I have an IWIN.com program manager and when playing my jewel game this faliure assertion has been coming up and my game crashes all the time...............help......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.