item.h.html
来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· HTML 代码 · 共 47 行
HTML
47 行
<html>
<head>
<title>item.h</title>
</head>
<body>
<pre> 1 #ifndef ITEM_H
2 #define ITEM_H
3
4 #include <string>
5
6 using namespace std;
7
8 <font color='#0000cc'>/**
9 Describes an item in an invoice.
10 */</font>
11 class Item
12 {
13 public:
14 <font color='#0000cc'>/**
15 Gets the unit price of this item.
16 @return the unit price
17 */</font>
18 virtual double get_unit_price() const = 0;
19 <font color='#0000cc'>/**
20 Gets the description of this item.
21 @return the description
22 */</font>
23 virtual string get_description() const = 0;
24 <font color='#0000cc'>/**
25 Gets the quantity of this item.
26 @return the quantity
27 */</font>
28 virtual int get_quantity() const = 0;
29 <font color='#0000cc'>/**
30 Gets the total price of this item.
31 @return the total price
32 */</font>
33 double get_total_price() const;
34 virtual ~Item();
35 };
36
37 #endif</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?