#include"MyAdd.h"
#pragma comment( lib, "MyAdd.lib" )
int main( )
{
mclmcrInitialize();
MyAddInitialize();
int a = 0;
int b = 0;
printf("Enter the value of a:\n");
scanf_s("%d", &a);
printf("Enter the value of b:\n");
scanf_s("%d", &b);
mwArray mwA(1, 1, mxDOUBLE_CLASS);
mwArray mwB(1, 1, mxDOUBLE_CLASS);
mwArray mwC(1, 1, mxDOUBLE_CLASS);
mwA.SetData(&a, 1);
mwB.SetData(&b, 1);
MyAdd(1, mwC, mwA, mwB);
int c = mwC.Get(1, 1);
printf("c is %d\n", c);
MyAddTerminate();
mclTerminateApplication();
return 0;
}
出现的问题: