ostringstream是一个未定义的类型?

twe*_*ypi 1 c++ string iostream stream ostringstream

在我的C++项目中,我正在尝试这样做:

 std::ostringstream stream(std::ostringstream::out);
Run Code Online (Sandbox Code Playgroud)

但我收到一个错误:

error C2027: use of undefined type 'std::basic_ostringstream<_Elem,_Traits,_Alloc>'
Run Code Online (Sandbox Code Playgroud)

我已经包含了iostream和ostream库所以我不确定为什么它将ostringstream视为未定义...

Pot*_*ter 7

std::ostringstream定义于<sstream>.<iostream>只包含一个前瞻性声明,<ostream>根本没有帮助.