C++ and Matlab
I am not clear what you want.
Do you want to call a MATLAB script inside your C++ code, you want to write a function in C++ (to speed up your program) and call it from MATLAB script?
the first one is pretty easy, search "MATLAB computation engine" in MATLAB help, it is very easy.
to do the second one (calling a C++ program inside MATLAB), if you use simulink, see S-function in Help.
If it is not your answer please provide more information on what you want.