int main()
{
std::stringstream s1("This is my string.");
std::stringstream s2 = s1; // error, copying not allowed
}
Run Code Online (Sandbox Code Playgroud)
我找不到为什么我不能复制stringstream的原因.你能提供一些参考吗?
#include <sstream>
using namespace std;
int main()
{
cout << "hi"; // error: undeclared cout
}
Run Code Online (Sandbox Code Playgroud)
根据我的阅读,sstream类派生自iostream类,但为什么不自动包含它?