The Code that I entered for a C++ Matlab Extension file is:
#include "mex.h"
void mexFunction(int nlhs,
mxArray*plhs[]
int nrhs,
const mxArray*prhs[])
{
mexPrintf("Hello, mex!\n");
}
but it gives this error message:
error: expected ',' or '...' before 'int'
int nrhs,
^

 채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 3일

1 개 추천

mxArray*plhs[] needs a comma after it

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

제품

릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by