我有一个问题,使用此代码:
BOOL RegisterApp(HINSTANCE hInst)
{
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInst;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszClassName = szClassName;
//
//
return RegisterClass(&wc);
}
当我尝试使用&wc
时,我有这个错误:
Unhandled exception at 0x763adf81 in lab3.exe: 0xC0000005: Access violation reading location 0xcccccccc.
请帮助我,我需要做些什么?
答案 0 :(得分:4)