问题描述
- matlab2013a32位和vs2010混合编程
-
这是程序代码
#include"libsuanfa_1.h"
#include
using namespace std;int main()
{
int p1[16][5]={{4,3,9,8,1},{4,6,11,10,5},{4,3,9,2,7},{9,2,7,10,11},{9,7,11,10,5},{1,10,11,4,2},{3,1,11,10,5},{6,8,3,11,9},{10,9,1,2,6},{11,1,3,7,10},{10,11,5,1,3},{3,11,10,5,4},{11,6,7,3,5},{2,1,3,6,5},{1,9,10,4,2},{9,5,8,6,4}};
int t1[5]={3,1,10,6,2};
int p2[16][5]={{4,6,11,10,5},{4,3,9,2,7},{9,2,7,10,11},{9,7,11,10,5},{1,10,11,4,2},{3,1,11,10,5},{6,8,3,11,9},{10,9,1,2,6},{11,1,3,7,10},{10,11,5,1,3},{3,11,10,5,4},{11,6,7,3,5},{2,1,3,6,5},{1,9,10,4,2},{9,5,8,6,4},{3,1,10,6,2}};
int t2[5];
mwArray p11(16,5);
mwArray p21(16,5);
mwArray t11(1,5);
mwArray t21(1,5);
mwArray t(1,5);
p11.SetData(&p1[16][5],80);
p21.SetData(&p2[16][5],80);
t11.SetData(&t1[5],5);
suanfa_1(1,t21,p11,p21,t11);
t21.GetData(t2,5);
for(int ii=0;ii
cout
int ff;
cin>>ff;
return 0;
}
编译过后,运行时会出现
t.exe 中的 0x00000000 处有未经处理的异常: 0xC0000005: Access violation
选择中断后
__vfptr = CXX0030: 错误: 无法计算表达式的值
求解决