bundle.h

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

H
26
字号
#ifndef BUNDLE_H
#define BUNDLE_H

#include <vector>
#include "item.h"

/**
   A bundle of items that is again an item.
*/
class Bundle : public Item
{
public:
   /**
      Adds an item to this bundle.
      @param it the item to add
   */
   void add(Item* it);
   virtual double get_unit_price() const;
   virtual string get_description() const;
   virtual int get_quantity() const;  
private:
   vector<Item*> items;
};

#endif

⌨️ 快捷键说明

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