16,472
社区成员
发帖
与我相关
我的任务
分享
BSTR bstrString = NULL;
//给bstrString赋值的代码
std::wstring result(bstrString);
if( result.compare(L"\"OK\"") == 0 )
{
intResult = 0;
}
else if( result.compare(L"\"Invalid\"") == 0 )
{
intResult = 1;
}
else
{
intResult = 2;
}
BSTR bstrString = NULL;
//给bstrString赋值的代码
std::wstring result(bstrString);
if( result.compare(L"\"OK\"") == 0 )
{
intResult = 0;
}
else if( result.compare(L"\"Invalid\"") == 0 )
{
intResult = 1;
}
else
{
intResult = 2;
}
BSTR bstrString = NULL;
std::wstring result(bstrString);
不可能构造其他字符串...说明编译器优化能力相当不错咯