Using the C++ Math Library    

ToString( )

To extract a string from an mwArray, you can use the mwArray member function ToString(). For example,

The mwString class contains a dynamically allocated string and handles its memory management, including freeing the string when the mwString object goes out of scope. The mwString class has a cast operator that converts it to a char *.

You can safely use ToString() to construct char * function arguments, for example, strcat(str, A.ToString()). If you need to refer to the string in a context beyond the scope of the mwString object, use strdup() to make a copy of the string for yourself. Don't forget to free the copy when you're done with it.


 ExtractScalar( ) and ExtractData( ) Library Routines