| | |
Visual C++ program compiles, but won't run
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 bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez graph guess gui homeworkhelp homeworkhelper iamthwee ifpug ifstream incrementoperators infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






