Using the C++ Math Library | ![]() ![]() |
Renaming Functions to Avoid a Name Conflict
Casting arguments cannot resolve all the naming conflicts between the two libraries. For example, the MATLAB C++ Math Library functions char
and double
conflict with C++ data types. The library's clock()
function doesn't take any arguments and thus can't be overloaded. Whenever a MATLAB function name conflicts with a C++ keyword, type, or built-in function, the MATLAB C++ Math Library appends _func
to its name.
This table lists the functions in the library that have been renamed.
![]() | Casting an Argument to Avoid a Name Conflict | Example Program: Rewriting roots.m in C++ (ex8.cpp) | ![]() |