我有以下代码:C++转换的int * LONG
STDMETHODIMP CWrapper::openPort(LONG* m_OpenPortResult)
{
string str("test");
const char * c = str.c_str();
m_OpenPortResult=Open(c); //this does not work because "Open" returns an int
return S_OK;
}
int Open(const char* uKey)
{
}
我不能转换为 “int” 为 “LONG *”。 编译器告诉我“‘诠释’不能转换为‘LONG *’。
我也用INT *而不是LONG *试过了,但也给了我一个错误。
有人可以告诉我怎么能转换为int长*或* INT?