-
C++ (
http://www.daniweb.com/forums/forum8.html)
| Covinus | May 30th, 2007 4:16 am | |
| Assertion failure in loading 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;
}; |
| Covinus | May 30th, 2007 5:19 am | |
| Re: Assertion failure in loading my bad.. hehehe
i forgot to
fr=fopen; |
| All times are GMT -4. The time now is 3:27 pm. | |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC