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;
};