📄 product.h.html
字号:
<html>
<head>
<title>product.h</title>
</head>
<body>
<pre> 1 #ifndef PRODUCT_H
2 #define PRODUCT_H
3
4 #include <string>
5
6 using namespace std;
7
8 <font color='#0000cc'>/**
9 Describes a product with a description and a price.
10 */</font>
11 class Product
12 {
13 public:
14 <font color='#0000cc'>/**
15 Constructs a product with a given description and price.
16 @param d the description
17 @param p the price
18 */</font>
19 Product(string d, double p);
20 <font color='#0000cc'>/**
21 Gets the product description.
22 @return the description
23 */</font>
24 string get_description() const;
25 <font color='#0000cc'>/**
26 Gets the product price.
27 @return the price
28 */</font>
29 double get_price() const;
30
31 private:
32 string description;
33 double price;
34 };
35
36 inline string Product::get_description() const
37 {
38 return description;
39 }
40
41 inline double Product::get_price() const
42 {
43 return price;
44 }
45
46 #endif</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -