Using the C++ Math Library | ![]() ![]() |
Name Conflicts with Standard C Library Functions
Some functions in the standard C math library,
libm
, that is supplied with every C and C++ compiler have the same names as functions in the MATLAB C++ Math Library. The exact number of functions in conflict varies by platform. The MATLAB C++ Math Library uses two methods to resolve these name conflicts: argument casting and function renaming.
The MATLAB C++ Math Library renames some functions so that the library function is unique. For other functions, you must cast the argument passed to the function to the type expected by the MATLAB function.
![]() | Logical Values | Casting an Argument to Avoid a Name Conflict | ![]() |