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

3 views (last 30 days)
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,
^

Accepted Answer

Walter Roberson
Walter Roberson on 3 Nov 2020
mxArray*plhs[] needs a comma after it

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!