How do I typecast an mwArray to a C++ scalar variable?
Show older comments
How do I typecast an mwArray to a C++ scalar variable?
The methods for Extracting Data from an mwArray on page 3-41 of the MATLAB C++ Math Library User's Guide does not seem to work. I added the following code fragment to ex2.cpp at line 24:
mwArray U, S, V;
int32 i;
U=4;
i=U;
and I got the following error messages:
C:\programs\matlabR12\extern\include\cpp\stdexcpt.h(24) : warning C4273: 'strdup' : inconsistent dll
linkage. dllexport assumed.
ex2_2.cpp(30) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type
'class mwArray' (or there is no acceptable conversion)
MBUILD.BAT: Error: Compile of 'ex2_2.cpp' failed.
Accepted Answer
More Answers (0)
Categories
Find more on Deploy to C++ Applications Using mwArray API (C++03) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!