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

 Réponse acceptée

Walter Roberson
Walter Roberson le 3 Nov 2020

1 vote

mxArray*plhs[] needs a comma after it

Plus de réponses (0)

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange

Produits

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by