-
Notifications
You must be signed in to change notification settings - Fork 3k
/
ex13_18.h
32 lines (26 loc) · 666 Bytes
/
ex13_18.h
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
31
32
//
// ex13_18.h
// Exercise 13.18
//
// Created by pezy on 1/15/15.
//
// Define an Employee class that contains an employee name and a unique employee identifier.
// Give the class a default constructor and a constructor that
// takes a string representing the employee’s name.
// Each constructor should generate a unique ID by incrementing a static data member.
//
#ifndef CP5_ex13_18_h
#define CP5_ex13_18_h
#include <string>
using std::string;
class Employee {
public:
Employee();
Employee(const string &name);
const int id() const { return id_; }
private:
string name_;
int id_;
static int s_increment;
};
#endif