⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 how_0298.htm

📁 C++标准库 C++标准库 C++标准库 C++标准库
💻 HTM
字号:
<HTML><HEAD><TITLE>2.1 How to Read This Section</TITLE></HEAD><BODY><A HREF="ug2.htm"><IMG SRC="images/banner.gif"></A><BR><A HREF="str_8843.htm"><IMG SRC="images/prev.gif"></A><A HREF="booktoc2.htm"><IMG SRC="images/toc.gif"></A><A HREF="arc_7049.htm"><IMG SRC="images/next.gif"></A><BR><STRONG>Click on the banner to return to the user guide home page.</STRONG><H2>2.1 How to Read This Section</H2><P>This section is an introduction to C++ stream input and output. Section 2.2 explains the iostreams facility, how it works in principle, and how it should be used.  This section should be read by anyone who needs basic information on iostreams.  For readers who require deeper understanding, the section also gives an overview of the iostream architecture, its components, and class hierarchy.  </P><P>It is not necessary to read Section 2.2 in order to start using predefined iostreams as explained in Section 2.3.  However, we do recommend that you read the <I>Users Guide</I>'s section on internationalization first, because iostreams is internationalized using standard C++ locales.  The explanations in this section assume that you are familiar with locales and facets, and you will find countless references to the section on internationalization.</P><P>Sections 2.3 to 2.6 explain the basic operation of iostreams.  These sections can be read sequentially, or used as a reference for certain topics.  Read sequentially, they provide you with basic knowledge for working with iostreams.  Used as a reference, they provide answers to questions like:  <I>How do I check for iostreams errors?</I> and, <I>How do I work with file streams?</I></P><P>Sections 2.7 to 2.11 explain simple techniques for extending the iostreams framework, such as defining input and output operators for user-defined types, and adding manipulators.  These sections also cover more advanced features of iostreams, such as synchronization of streams.</P><P>Sections 2.12 and 2.13 explain advanced techniques for extending iostreams, such as creating new types of streams by derivation and defining a code conversion facet. </P><P>Section 2.14 describes the main differences between the Standard C++ Library iostreams and traditional iostreams.</P><P>Section 2.15 describes the main differences between the Standard C++ Library iostreams and the Rogue Wave implementation of iostreams in its own <I>Standard C++ Library</I>.  It points out features that are specific to the Rogue Wave implementation.</P><P>The Appendix describes standardization issues that are still open at the time of this writing and influence the content of this document.</P><A NAME="2.1.1"><H3>2.1.1 Code Examples</H3></A><P>Please note that the examples in this <I>User's Guide</I> might not compile in your particular environment due to incompatibilities with the particular release of your compiler or your library.  This is because few compilers available at the time of this printing are capable of understanding the whole range of language features defined by the ISO/ANSI C++ standard.  It is likely that at least a few of these features will not be supported by your own compiler.  The consequence is that some techniques demonstrated and explained in this <I>User's Guide</I> will not work with your compiler either. </P><P>We include examples that might not compile, rather than omitting certain techniques entirely, to demonstrate the full range of techniques the Standard C++ language will support.  This <I>User's Guide</I> was written with an eye to the C++ of the future.  Compilers will catch up, and techniques that don't work with your current compiler <I>will</I> work once your compiler can understand Standard C++.  Hopefully, including these techniques will extend the usefulness of this <I>User's Guide</I> to you.</P><P>Also, the code examples are simplified in that the necessary <SAMP>#include &#60;_></SAMP> statements and the using directive for the standard namespace<SAMP> ::std</SAMP> are omitted.  The intent is to make the examples as readable and focused as possible rather than ceaselessly repeating the same code fragments.</P><A NAME="2.1.2"><H3>2.1.2 Terminology</H3></A><P>The Standard C++ Library consists mostly of class and function templates.  Abbreviations for these templates are used throughout this <I>User's</I> <I>Guide</I>.  For example, <SAMP>fstream</SAMP> stands for <SAMP>template &#60;class charT, class traits> class basic_fstream</SAMP>.  A slightly more succinct notation for a class template is also frequently used:  <SAMP>basic_fstream &#60;charT, traits></SAMP>.</P><P>In addition to abbreviations, you will find certain contrived technical terms.  For example, <I>file stream </I>stands for the abstract notion of the file stream class template; <SAMP>badbit</SAMP> stands for the state flag <SAMP>ios_base::badbit</SAMP>.</P><HR><A HREF="str_8843.htm"><IMG SRC="images/prev.gif"></A> <A HREF="booktoc2.htm"><IMG SRC="images/toc.gif"></A><A HREF="arc_7049.htm"><IMG SRC="images/next.gif"></A><P>&copy;Copyright 1996, Rogue Wave Software, Inc.</P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -