Skip to content

Commit cb11de5

Browse files
committed
Started Chapter 13
1 parent c6f7dbb commit cb11de5

File tree

15 files changed

+90
-64
lines changed

15 files changed

+90
-64
lines changed

Structure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,16 +841,16 @@
841841

842842
`good`, `eof`等。
843843

844+
### 字符串输入输出`sstream`
845+
846+
简单展示一些例子就行。
847+
844848
### 文件输入输出`fstream`
845849

846850
#### 打开模式
847851

848852
只讲简单的`in`, `out`, `trunc``app`,至于`binary`,放精讲篇。
849853

850-
### 字符串输入输出`sstream`
851-
852-
简单展示一些例子就行。
853-
854854
# 精讲篇
855855

856856
## 数据

generalized_part.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ \part*{泛讲篇}
1111
\import{generalized_parts/}{09_class_inheritance.tex}
1212
\import{generalized_parts/}{10_common_problems_in_inheritance.tex}
1313
\import{generalized_parts/}{11_templates_and_fundamental_generic_programming.tex}
14-
\import{generalized_parts/}{12_introduction_to_exceptions.tex}
14+
\import{generalized_parts/}{12_introduction_to_exceptions.tex}
15+
\import{generalized_parts/}{13_input_output_streams_overview.tex}

generalized_parts/12_introduction_to_exceptions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ \chapter{异常处理简介}
1717
而关于异常处理的知识,说多不多,说少也不少。限于篇幅,在泛讲篇中我们就介绍一下最基础的部分。至于更深入的内容,让我们留到精讲篇吧。\par
1818
\import{../generalized_parts/12_introduction_to_exceptions/}{01_try_catch_throw.tex}
1919
\import{../generalized_parts/12_introduction_to_exceptions/}{02_std_exception.tex}
20-
\import{../generalized_parts/12_introduction_to_exceptions/}{03_exercise_matrix.tex}
20+
\import{../generalized_parts/12_introduction_to_exceptions/}{03_exercise_matrix.tex}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
\chapter{输入/输出流简介}
2+
现在来到泛讲篇的最后一章,让我们来看一下输入/输出流的相关知识。\par
3+
一个基本的冯·诺依曼结构\footnote{冯·诺依曼结构(Von Neumann architecture),是一种存储程序逻辑架构。当今的主流计算机几乎都是依托于冯·诺依曼结构的。}计算机包含五个部分:控制器、运算器、存储器、输入设备和输出设备。
4+
\begin{figure}[htbp]
5+
\centering
6+
\includegraphics[width=.5\textwidth]{../images/generalized_parts/13_von_neumann_architecture.png}
7+
\caption{冯·诺依曼结构示意图}
8+
\end{figure}
9+
其中,输入设备和输出设备是计算机与外界进行交互的渠道。我们点击一个按扭,或者键入一串数字,或是扫描,或是摄像,甚至用蓝牙等传入信息,都是输入;电脑显示屏的显示内容,音乐的播放,文本的打印,都是输出。不过对于一个命令行界面的程序来说,用户与计算机的交互方式就很简单了。用户输入字符,程序显示字符,这是我们长期以来使用的交互方法。在本章,我们将进一步理解标准输入和输出,及它们的应用,并学习另外两种常用的输入输出方式。\par
10+
\import{../generalized_parts/13_input_output_streams_overview/}{01_data_transfer_in_streams.tex}
11+
\import{../generalized_parts/13_input_output_streams_overview/}{02_iostream.tex}
12+
\import{../generalized_parts/13_input_output_streams_overview/}{03_sstream.tex}
13+
\import{../generalized_parts/13_input_output_streams_overview/}{04_fstream.tex}

generalized_parts/13_input_output_streams_overview/01_data_transfer_in_streams.tex

Whitespace-only changes.

generalized_parts/13_input_output_streams_overview/02_iostream.tex

Whitespace-only changes.

generalized_parts/13_input_output_streams_overview/03_sstream.tex

Whitespace-only changes.

generalized_parts/13_input_output_streams_overview/04_fstream.tex

Whitespace-only changes.
11.8 KB
Loading

main.aux

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -239,19 +239,23 @@
239239
\@writefile{toc}{\contentsline {section}{\numberline {12.3}实操:简单矩阵类的设计}{349}{section.12.3}\protected@file@percent }
240240
\@writefile{lol}{\contentsline {lstlisting}{\numberline {12.2}\texttt {Header.hpp}}{357}{lstlisting.12.2}\protected@file@percent }
241241
\@writefile{lol}{\contentsline {lstlisting}{\numberline {12.3}\texttt {Definition.tpp}}{359}{lstlisting.12.3}\protected@file@percent }
242+
\@writefile{toc}{\contentsline {chapter}{\numberline {第十三章\hspace {.3em}}输入/输出流简介}{365}{chapter.13}\protected@file@percent }
243+
\@writefile{lof}{\addvspace {10.0pt}}
244+
\@writefile{lot}{\addvspace {10.0pt}}
245+
\@writefile{lof}{\contentsline {figure}{\numberline {13.1}{\ignorespaces 冯·诺依曼结构示意图}}{365}{figure.13.1}\protected@file@percent }
242246
\gdef \LT@i {\LT@entry
243247
{1}{42.00002pt}\LT@entry
244248
{1}{136.19997pt}\LT@entry
245249
{1}{117.00002pt}\LT@entry
246250
{1}{52.00002pt}\LT@entry
247251
{1}{86.48302pt}}
248-
\@writefile{toc}{\contentsline {part}{精讲篇}{367}{part*.249}\protected@file@percent }
249-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 A\hspace {.3em}}C++运算符基本属性}{367}{appendix.A}\protected@file@percent }
252+
\@writefile{toc}{\contentsline {part}{精讲篇}{369}{part*.249}\protected@file@percent }
253+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 A\hspace {.3em}}C++运算符基本属性}{369}{appendix.A}\protected@file@percent }
250254
\@writefile{lof}{\addvspace {10.0pt}}
251255
\@writefile{lot}{\addvspace {10.0pt}}
252-
\newlabel{ch:appendix_A}{{A}{367}{C++运算符基本属性}{appendix.A}{}}
253-
\@writefile{lot}{\contentsline {table}{\numberline {A.1}{截至C++17的所有运算符}}{367}{table.A.1}\protected@file@percent }
254-
\newlabel{tab:A-1}{{A.1}{367}{截至C++17的所有运算符}{table.A.1}{}}
256+
\newlabel{ch:appendix_A}{{A}{369}{C++运算符基本属性}{appendix.A}{}}
257+
\@writefile{lot}{\contentsline {table}{\numberline {A.1}{截至C++17的所有运算符}}{369}{table.A.1}\protected@file@percent }
258+
\newlabel{tab:A-1}{{A.1}{369}{截至C++17的所有运算符}{table.A.1}{}}
255259
\gdef \LT@ii {\LT@entry
256260
{1}{33.67001pt}\LT@entry
257261
{1}{33.81001pt}\LT@entry
@@ -263,11 +267,11 @@
263267
{1}{26.72002pt}\LT@entry
264268
{1}{27.283pt}\LT@entry
265269
{1}{86.44002pt}}
266-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 B\hspace {.3em}}ASCII码表(0到127)}{369}{appendix.B}\protected@file@percent }
270+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 B\hspace {.3em}}ASCII码表(0到127)}{371}{appendix.B}\protected@file@percent }
267271
\@writefile{lof}{\addvspace {10.0pt}}
268272
\@writefile{lot}{\addvspace {10.0pt}}
269-
\@writefile{lot}{\contentsline {table}{\numberline {B.1}{33个ASCII控制字符}}{369}{table.B.1}\protected@file@percent }
270-
\newlabel{tab:B-1}{{B.1}{369}{33个ASCII控制字符}{table.B.1}{}}
273+
\@writefile{lot}{\contentsline {table}{\numberline {B.1}{33个ASCII控制字符}}{371}{table.B.1}\protected@file@percent }
274+
\newlabel{tab:B-1}{{B.1}{371}{33个ASCII控制字符}{table.B.1}{}}
271275
\gdef \LT@iii {\LT@entry
272276
{1}{33.67001pt}\LT@entry
273277
{1}{33.81001pt}\LT@entry
@@ -281,20 +285,20 @@
281285
{1}{33.67001pt}\LT@entry
282286
{1}{33.81001pt}\LT@entry
283287
{1}{26.72002pt}}
284-
\@writefile{lot}{\contentsline {table}{\numberline {B.2}{95个ASCII可打印字符}}{370}{table.B.2}\protected@file@percent }
285-
\newlabel{tab:B-2}{{B.2}{370}{95个ASCII可打印字符}{table.B.2}{}}
286-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 C\hspace {.3em}}相关数学知识}{371}{appendix.C}\protected@file@percent }
288+
\@writefile{lot}{\contentsline {table}{\numberline {B.2}{95个ASCII可打印字符}}{372}{table.B.2}\protected@file@percent }
289+
\newlabel{tab:B-2}{{B.2}{372}{95个ASCII可打印字符}{table.B.2}{}}
290+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 C\hspace {.3em}}相关数学知识}{373}{appendix.C}\protected@file@percent }
287291
\@writefile{lof}{\addvspace {10.0pt}}
288292
\@writefile{lot}{\addvspace {10.0pt}}
289-
\@writefile{toc}{\contentsline {section}{\numberline {C.1}数制转换}{371}{section.C.1}\protected@file@percent }
290-
\@writefile{lof}{\contentsline {figure}{\numberline {C.1}{\ignorespaces 一个简单的数字时钟}}{371}{figure.C.1}\protected@file@percent }
291-
\@writefile{lof}{\contentsline {figure}{\numberline {C.2}{\ignorespaces 从计数到乘方}}{372}{figure.C.2}\protected@file@percent }
292-
\@writefile{lof}{\contentsline {figure}{\numberline {C.3}{\ignorespaces 一个12进制乘法表}}{373}{figure.C.3}\protected@file@percent }
293-
\@writefile{lof}{\contentsline {figure}{\numberline {C.4}{\ignorespaces $(1a.c3)_{16}$的形式化表示}}{375}{figure.C.4}\protected@file@percent }
294-
\@writefile{lof}{\contentsline {figure}{\numberline {C.5}{\ignorespaces 通过短除法把十进制数转换成$R$进制}}{378}{figure.C.5}\protected@file@percent }
295-
\@writefile{lof}{\contentsline {figure}{\numberline {C.6}{\ignorespaces 二进制与八进制的转换}}{379}{figure.C.6}\protected@file@percent }
296-
\@writefile{lof}{\contentsline {figure}{\numberline {C.7}{\ignorespaces 二进制与十六进制的转换}}{380}{figure.C.7}\protected@file@percent }
297-
\@writefile{toc}{\contentsline {section}{\numberline {C.2}布尔代数基础}{380}{section.C.2}\protected@file@percent }
298-
\@writefile{lof}{\contentsline {figure}{\numberline {C.8}{\ignorespaces 玛雅数字与阿拉伯数字的对应关系}}{381}{figure.C.8}\protected@file@percent }
299-
\@writefile{toc}{\contentsline {chapter}{跋}{383}{appendix*.258}\protected@file@percent }
300-
\gdef \@abspage@last{392}
293+
\@writefile{toc}{\contentsline {section}{\numberline {C.1}数制转换}{373}{section.C.1}\protected@file@percent }
294+
\@writefile{lof}{\contentsline {figure}{\numberline {C.1}{\ignorespaces 一个简单的数字时钟}}{373}{figure.C.1}\protected@file@percent }
295+
\@writefile{lof}{\contentsline {figure}{\numberline {C.2}{\ignorespaces 从计数到乘方}}{374}{figure.C.2}\protected@file@percent }
296+
\@writefile{lof}{\contentsline {figure}{\numberline {C.3}{\ignorespaces 一个12进制乘法表}}{375}{figure.C.3}\protected@file@percent }
297+
\@writefile{lof}{\contentsline {figure}{\numberline {C.4}{\ignorespaces $(1a.c3)_{16}$的形式化表示}}{377}{figure.C.4}\protected@file@percent }
298+
\@writefile{lof}{\contentsline {figure}{\numberline {C.5}{\ignorespaces 通过短除法把十进制数转换成$R$进制}}{380}{figure.C.5}\protected@file@percent }
299+
\@writefile{lof}{\contentsline {figure}{\numberline {C.6}{\ignorespaces 二进制与八进制的转换}}{381}{figure.C.6}\protected@file@percent }
300+
\@writefile{lof}{\contentsline {figure}{\numberline {C.7}{\ignorespaces 二进制与十六进制的转换}}{382}{figure.C.7}\protected@file@percent }
301+
\@writefile{toc}{\contentsline {section}{\numberline {C.2}布尔代数基础}{382}{section.C.2}\protected@file@percent }
302+
\@writefile{lof}{\contentsline {figure}{\numberline {C.8}{\ignorespaces 玛雅数字与阿拉伯数字的对应关系}}{383}{figure.C.8}\protected@file@percent }
303+
\@writefile{toc}{\contentsline {chapter}{跋}{385}{appendix*.258}\protected@file@percent }
304+
\gdef \@abspage@last{394}

0 commit comments

Comments
 (0)