我后来又把程序改了下,
只留下这几句:engine *ep;
if(!(ep=engOpen(NULL)))
        MessageBox("不能打开MATLAB引擎","engine demo",MB_OK);
结果发现调试时运行到if(!(ep=engOpen(NULL)))这一句时就出现Unhandled   exception   in   XXX.exe:0xc0000005:   Access   Violation   ;怎么回事啊?