C-Mex Error: expected "..." or ","

조회 수: 2 (최근 30일)
Lance Randall Gamier
Lance Randall Gamier 2020년 11월 3일
답변: Walter Roberson 2020년 11월 3일
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일
mxArray*plhs[] needs a comma after it

추가 답변 (0개)

카테고리

Help CenterFile 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