Finally i found the answer for my scenario. Since the algorithm I am using uses a very complex data, I need to use the binary data format but all the binary data formats supported by Matlab are not supported for conversion/porting to C++.
List of all the functions supported in conversion of Matlab code to C++
List of Data formats supported by Matlab
http://www.mathworks.in/help/matlab/import_export/supported-file-formats.html
It seems none of the functions data formats supported by matlab are supported in conversion.
Hence I will definitely have to rewrite the code