Files
  • main.cpp
  • group.h
  • person.h
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include "person.h"
#include "group.h"

// Using the standard namespace
using namespace std;

int main() {
  
  // Create a new 'Person' object
  Person dan;
  dan.setId(1234);
  dan.setName("Dan");

  // Use the C-Output (cout) stream
  cout << "ID: " << dan.getId() << endl;
  cout << "Name: " << dan.getName() << endl;

  Group set;
  set.addPerson(dan);
  cout << "Size: " << set.size() << endl;
  set.removePerson(dan);
  cout << "Size: " << set.size() << endl;


  // Return 0
  return 0;

}
gcc version 4.6.3