| | |
Assertion failure in loading
Please support our C++ advertiser: Intel Parallel Studio Home
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 beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





