我怎样才能做到这一点:
_name__GetAvailable inp;
QString tmp;
inp.From = tmp;
这是名称_GetAvailable 类的定义:
class SOAP_CMAC _name__GetAvailable
{
public:
std::string *From;
std::string *To;
struct soap *soap;
}
我试过这个:
inp.From = tmp.toStdString();
但我有以下错误:
C:\Qt2\Qt5.0.1\Tools\QtCreator\bin\Ticket\mainwindow.cpp:49: 错误:无法将 'std::string {aka std::basic_string}' 转换为 'std::string* {aka std ::basic_string*}' 在赋值中