telephone.cpp.html
来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· HTML 代码 · 共 31 行
HTML
31 行
<html>
<head>
<title>telephone.cpp</title>
</head>
<body>
<pre> 1 # include "telephone.h"
2 # include "connection.h"
3
4 void Telephone::run(Connection& c)
5 {
6 bool more = true;
7 while (more)
8 {
9 string input;
10 getline(cin, input);
11 if (input == "H")
12 c.hangup();
13 else if (input == "Q")
14 more = false;
15 else if ((input.length() == 1) &&
16 (isdigit(input[0]) || input[0] == '#'))
17 c.dial(input);
18 else
19 c.record(input);
20 }
21 }</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?