| | |
Visual C++ program compiles, but won't run
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Nov 2004
Posts: 5
Reputation:
Solved Threads: 0
I am working on a time card program in Visual C++ (FYI: I am VERY new to this, so, please, be gentle with me)
It compiles with 0 errors and 0 warnings, but when it executes I get an error message that the program needs to close. When I tried to go into Debug, it gave me "Unhandled exception in MFCTimeCard.exe:0XC0000005: Access Violation" I click on OK and it goes to this piece of code in the AfxWinMain()
if (!pThread->InitInstance())
{
if (pThread->m_pMainWnd != NULL)
{
TRACE0("Warning: Destroying non-NULL m_pMainWnd\n");
pThread->m_pMainWnd->DestroyWindow();
}
nReturnCode = pThread->ExitInstance();
goto InitFailure;
}
nReturnCode = pThread->Run();
Please let me know if anyone needs more info. BTW: I did not touch this particular bit when working. I did however add the InitInstance() in a source file.
THANKS!!!
It compiles with 0 errors and 0 warnings, but when it executes I get an error message that the program needs to close. When I tried to go into Debug, it gave me "Unhandled exception in MFCTimeCard.exe:0XC0000005: Access Violation" I click on OK and it goes to this piece of code in the AfxWinMain()if (!pThread->InitInstance())
{
if (pThread->m_pMainWnd != NULL)
{
TRACE0("Warning: Destroying non-NULL m_pMainWnd\n");
pThread->m_pMainWnd->DestroyWindow();
}
nReturnCode = pThread->ExitInstance();
goto InitFailure;
}
nReturnCode = pThread->Run();
Please let me know if anyone needs more info. BTW: I did not touch this particular bit when working. I did however add the InitInstance() in a source file.
THANKS!!!
![]() |
Similar Threads
- my program dont run good...array of structures in c...i used dev-c++ (C)
- Pascal : Cant see why program wont run, exits with error. (Pascal and Delphi)
- my program is compiled.but on run that i have message "Exception in thread "main" jav (Java)
Other Threads in the C++ Forum
- Previous Thread: C++ Data Types
- Next Thread: Setting double to infinity
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number 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 wordfrequency wxwidgets






