Where did you come up the the name "matlab.hpp" from? In VC "xxx.hpp" usually refers to a printer driver.
I have all available help files for Matlab loaded and search does not find anything about "matlab.hpp". But, there is a matlab.h!
I don't understand why you added the include line if you don't have the file. C-language include files are actual files that reside in the default include directory for the compiler, unless there is a means of directing the compiler to search elsewhere.
I'm not getting the feeling that you understand C sufficiently for you to do this. Why not simply write your own sign function? Unless you have a throughput problem?
sign(x) = x/|x| for x<>0
or
sign(x) = if(x<>0,if(x>0,"+","-","x=0"
or several other possibilities.
"matlab.hpp declares the MATLAB C++ Math Library's data types and functions. matlab.hpp includes iostream.h, which declares the input and output streams cin and cout. stdlib.h contains the definition of EXIT_SUCCESS"
In order to be able to use MATLAB C/C++ Math Library functions in your c++ code you have to setup you compiler
In your project setteings you should do following
1) add lib files to your project settings under link bookmark
Go to MATLAB help
Using the C++ Math Library: Getting Started: Linking Applications Without mbuild (I strongly suggest you to read Getting started and Fundamential of the help)
to see which lib files to connect.
2) Also check "Disable Language extensions"
3) add preprocessor definition "MS_WIN_API"
4) and still I had to "force file output"
In Tools -> Options -> directories put all the nessessary paths to the libraries and include files