For ease of use and compatibility, all of the basic_* I/O-related classes are given typedef names for both of the builtin character widths (wide and narrow). The typedefs are the same as the pre-Standard names, for example:
typedef basic_ifstream<char> ifstream;
Because properly forward-declaring these classes can be difficult, you should not do it yourself. Instead, include the <iosfwd> header, which contains only declarations of all the I/O classes as well as the typedefs. Trying to forward-declare the typedefs themselves (e.g., "class ostream;") is not valid ISO C++.
For more specific declarations, see http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
typedef basic_filebuf<char> std::filebuf |
typedef basic_fstream<char> std::fstream |
typedef basic_ifstream<char> std::ifstream |
typedef basic_ios<char> std::ios |
typedef basic_iostream<char> std::iostream |
typedef basic_istream<char> std::istream |
typedef basic_istringstream<char> std::istringstream |
typedef basic_ofstream<char> std::ofstream |
typedef basic_ostream<char> std::ostream |
typedef basic_ostringstream<char> std::ostringstream |
typedef basic_streambuf<char> std::streambuf |
typedef basic_stringbuf<char> std::stringbuf |
typedef basic_stringstream<char> std::stringstream |
typedef basic_filebuf<wchar_t> std::wfilebuf |
typedef basic_fstream<wchar_t> std::wfstream |
typedef basic_ifstream<wchar_t> std::wifstream |
typedef basic_ios<wchar_t> std::wios |
typedef basic_iostream<wchar_t> std::wiostream |
typedef basic_istream<wchar_t> std::wistream |
typedef basic_istringstream<wchar_t> std::wistringstream |
typedef basic_ofstream<wchar_t> std::wofstream |
typedef basic_ostream<wchar_t> std::wostream |
typedef basic_ostringstream<wchar_t> std::wostringstream |
typedef basic_streambuf<wchar_t> std::wstreambuf |
typedef basic_stringbuf<wchar_t> std::wstringbuf |
typedef basic_stringstream<wchar_t> std::wstringstream |