Visual C++: 'streambuf' base class undefined

C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestrstream(19) : error C2504: 'streambuf' : base class undefined

I'm getting the above error and a 100 other compile errors. Why would this happen? In the editor if I right click the symbol streambuf and go to declaration it leads to the header file c:Program Files (x86)Microsoft Visual Studio 9.0VCincludeiosfwd and shows the declaration

typedef basic_streambuf <char, char_traits<char> > streambuf;

I know this is old, but I found I had the same issue when trying to inherit from fstream. The answer was to add before my class declaration:

using namespace std;
链接地址: http://www.djcxy.com/p/95530.html

上一篇: “基类未定义。”

下一篇: Visual C ++:'streambuf'基类未定义