⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invoicetest.cpp.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 HTML
字号:
<html>

<head>
	<title>invoicetest.cpp</title>
</head>

<body>
<pre>  1  #include &lt;vector&gt;
  2  
  3  using namespace std;
  4  
  5  #include "bundle.h"
  6  #include "invoice.h"
  7  #include "productitem.h"
  8  #include "simpleinvoiceprinter.h"
  9  
 10  int main()
 11  {
 12     Invoice sample_invoice;
 13     vector&lt;int&gt; widths;
 14     widths.push_back(30);
 15     widths.push_back(12);
 16     widths.push_back(4);
 17     widths.push_back(12);
 18     SimpleInvoicePrinter printer(widths);
 19     sample_invoice.add(new ProductItem(Product("Toaster", 29.99), 3));
 20     Bundle* combo = new Bundle();
 21     combo-&gt;add(new ProductItem(Product("Hammer", 19.95), 1));
 22     combo-&gt;add(new ProductItem(Product("Nails", 0.01), 100));
 23     sample_invoice.add(combo);
 24  
 25     sample_invoice.print(printer);
 26     return 0;
 27  }</pre>
</body>
</html>

⌨️ 快捷键说明

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