我后来又把程序改了下,
只留下这几句:engine *ep;
if(!(ep=engOpen(NULL)))
MessageBox("不能打开MATLAB引擎","engine demo",MB_OK);
结果发现调试时运行到if(!(ep=engOpen(NULL)))这一句时就出现Unhandled exception in XXX.exe:0xc0000005: Access Violation ;怎么回事啊?
只留下这几句:engine *ep;
if(!(ep=engOpen(NULL)))
MessageBox("不能打开MATLAB引擎","engine demo",MB_OK);
结果发现调试时运行到if(!(ep=engOpen(NULL)))这一句时就出现Unhandled exception in XXX.exe:0xc0000005: Access Violation ;怎么回事啊?
Unhandled exception in XXX.exe:0xc0000005(NTDLL.DLL) Access Violation ;是什么意思啊?NTDLL.DLL?????????
1. 指针未初始化访问
2. 指针被修改为非用户内存地址范围
3. malloc或new后的指针,当不需要时仅free或delete,但未使指针赋空,
访问违例.