我在QT中声明StringStream时遇到问题。 这里是我的代码:在QT中声明StringStream问题
std::stringstream ss;
for (int i = 0; i <= path.length()-1; ++i)
{
if (path[i] == '\\')
{
ss << "\\\\";
}
else
{
ss << path[i];
}
}
path = QString::fromStdString(ss.str());//store the stringstream to a string
return path;
的错误信息是:
aggregate 'std::stringstream ss' has incomplete type and cannot be defined;
什么行会导致错误,以及您收到什么错误消息? – 2011-04-11 05:50:47
嗯......问题在哪里?它没有编译?请发布错误消息。 – Naveen 2011-04-11 05:50:58
那里我贴出了错误 – 2011-04-11 05:57:24