bundle.h.html

来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· HTML 代码 · 共 35 行

HTML
35
字号
<html>

<head>
	<title>bundle.h</title>
</head>

<body>
<pre>  1  #ifndef BUNDLE_H
  2  #define BUNDLE_H
  3  
  4  #include &lt;vector&gt;
  5  #include "item.h"
  6  
  7  <font color='#0000cc'>/**
  8     A bundle of items that is again an item.
  9  */</font>
 10  class Bundle : public Item
 11  {
 12  public:
 13     <font color='#0000cc'>/**
 14        Adds an item to this bundle.
 15        @param it the item to add
 16     */</font>
 17     void add(Item* it);
 18     virtual double get_unit_price() const;
 19     virtual string get_description() const;
 20     virtual int get_quantity() const;
 21  private:
 22     vector&lt;Item*&gt; items;
 23  };
 24  
 25  #endif</pre>
</body>
</html>

⌨️ 快捷键说明

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