Download

Failed to pass std::string to third party interface with error ( invalid character in string )

Hi,

I try to invoke interface with std::string as input parameters.

I did some step by step debugging, the string is correct in the UE4 c++ part, but become** invalid character **when inside the third party library. Now know what I am done wrong, please help.

my.h
public:
aruco::CameraParameters Param;
std::string* ParamFile;
void readFile();

my.cpp

void readFile() {
ParamFile = new std::string(“e:/workspace/LifeCam.yml”);
Param.readFromXMLFile(*ParamFile);
}

Don’t know the reason. But after I use char* instead of std::string*. It works fine.
A little bit similar to my previous question. Can’t send self-defiend object reference into my library.
Hope someone could help me out. So Weird.