MATLAB: C-Mex Error: expected “…” or “,”

MATLABmexmex compiler

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,
^

Best Answer

mxArray*plhs[] needs a comma after it
Related Question