| | |
Assertion failure in loading
Thread Solved
![]() |
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
here part of the code
c++ Syntax (Toggle Plain Text)
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; };
Last edited by Covinus; May 30th, 2007 at 4:17 am.
if you cant hit 2 birds with one stone try hitting just one or you will end up with nothing at all
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: C++ Double - 8th point decimals
- Next Thread: string to int conversion
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ char class classes classified code coding compatible compile console conversion count date delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file filewrite forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper homeworksolutions iamthwee icon if...else ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node object output play pointer problem program programming project python random read recursion reference rpg string strings struct symbol temperature template test text text-file toolkit tree url values variable vector video win32 windows winsock wordfrequency wxwidgets





