osstringstream throws表达式必须是左值或函数指定符错误

时间:2019-05-09 09:17:51

标签: c++

我正在按如下方式构造std :: string

std::string sErrorInfo= "";
std::string TableName= getTableName();
double* myTable = MaskTableLimit::getFunction().getAddressesByName(tableName);

sErrorInfo = tableName + " is not correctly defined. Spectrum limit on the frequency (Fc-" + static_cast<ostringstream*>(&(ostringstream() << myTable[1]))->str() + ") MHz must be equal to that of the frequency (Fc-" + static_cast<ostringstream*>(&(ostringstream() << myTable[3]))->str() + ") MHz.";`

并且使用Visual Studio 2017平台进行编译时,这仅引发表达式必须是左值或函数指示符错误。

错误似乎出在构造函数调用上,

 &(osstringstream()->)  

我不知道为什么会这样。任何帮助将不胜感激。

谢谢

0 个答案:

没有答案