telephone.h
来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· C头文件 代码 · 共 40 行
H
40 行
#ifndef TELEPHONE_H
#define TELEPHONE_H
using namespace std;
#include <iostream>
#include <string>
class Connection;
/**
A telephone that takes simulated keystrokes and voice input
from the user and simulates spoken text.
*/
class Telephone
{
public:
/**
Speak a message to standard output
@param output the text that will be spoken
*/
void speak(string output);
/**
Loops reading user input and passes the input
to the Connection object's functions dial, record,
or hangup.
@param c the connection that connects this phone
to the voice mail system
*/
void run(Connection& c);
};
inline void Telephone::speak(string output)
{
cout << output;
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?