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

📄 telephone.h.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 HTML
字号:
<html>

<head>
	<title>telephone.h</title>
</head>

<body>
<pre>  1  #ifndef TELEPHONE_H
  2  #define TELEPHONE_H
  3  
  4  using namespace std;
  5  
  6  #include &lt;iostream&gt;
  7  #include &lt;string&gt;
  8  
  9  class Connection;
 10  
 <font color="#0000cc">11  /**
 12     A telephone that takes simulated keystrokes and voice input
 13     from the user and simulates spoken text.
 14  */</font>
 15  class Telephone
 16  {
 17  public:
 <font color="#0000cc">18     /**
 19        Speak a message to standard output
 20        @param output the text that will be spoken
 21     */</font>
 22     void speak(string output);
 23  
 <font color="#0000cc">24     /**
 25        Loops reading user input and passes the input
 26        to the Connection object's functions dial, record,
 27        or hangup. 
 28        @param c the connection that connects this phone
 29        to the voice mail system
 30     */</font>
 31     void run(Connection&amp; c);
 32  };
 33  
 34  inline void Telephone::speak(string output)
 35  {
 36     cout &lt;&lt; output;
 37  }
 38  
 39  #endif</pre>
</body>
</html>

⌨️ 快捷键说明

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