描述
它用于输入 - 输出正向声明,此标题提供标准输入/输出库类型的前向声明.
定义
以下是iosfwd函数的定义.
#define _GLIBCXX_IOSFWD
示例
C ++ 98
在下面的示例中说明了iosfwd函数.
amespace std { templatestruct char_traits; template<> class char_traits ; template<> class char_traits ; template class allocator; template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template , class Alloc=allocator > class basic_stringbuf; template , class Alloc=allocator > class basic_istringstream; template , class Alloc=allocator > class basic_ostringstream; template , class Alloc=allocator > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; template class fpos; typedef basic_ios ios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_ios wios; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; typedef fpos streampos; typedef fpos wstreampos;}
C ++ 11
以下示例解释了iosfwd函数.
namespace std { templatestruct char_traits; template<> class char_traits ; template<> class char_traits ; template<> class char_traits ; template<> class char_traits ; template class allocator; template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template , class Alloc=allocator > class basic_stringbuf; template , class Alloc=allocator > class basic_istringstream; template , class Alloc=allocator > class basic_ostringstream; template , class Alloc=allocator > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; template class fpos; typedef basic_ios ios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_ios wios; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; typedef fpos streampos; typedef fpos wstreampos;}