我重载了MyDoc类中的OnFile函数,如何在主框架也使用这个重载的函数
我的做法是重载MyApp的OnFileOpen(){
OnFileNew();
CMiniDrawDoc* pDoc=(CMiniDrawDoc*)(((CMainFrame*)GetMainWnd ())
->GetActiveDocument());
pDoc->fileOpen ();//fileOpen是MyDoc中的公有函数,调用了OnFileOpen()
}
编译没错,可是执行有错:access voilate
这是怎么回事啊?

