include iostream include vector include Receipt int main int argc char

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <vector>
#include "Receipt.h"
int main(int argc, char *argv[])
{
std::vector<Receipt> receipts;
receipts.push_back(Receipt(1, FIO("Ivan", "Ivanov", "Ivanovich"), 100, 2, Date(10, 2, 2015), Date(24, 4, 2015), true, false, false, true, false));
receipts.push_back(Receipt(2, FIO("Andrei", "Popov", "Ivanovich"), 130, 7, Date(7, 1, 2015), Date(3, 2, 2015), true, false, false, false, true));
for (unsigned int i = 0; i < receipts.size(); i++)
{
std::cout << "Id: " << receipts[i].id
<< " Residence: " << receipts[i].residence()
<< " Total Cost: " << receipts[i].totalCost()
<< std::endl;
}
system("PAUSE");
return 0;
}