- Include the header files "mex.h" in the C++ code.
- Declare a "print_val" or any other function for printing in the header file with input set to "const char*".
- Implement the "print_val" function like below:
- Call the '"print_val" function in the C++ code with the message for printing the messages at runtime.