forked from Mooophy/Cpp-Primer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex13_19.h
35 lines (29 loc) · 786 Bytes
/
ex13_19.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
33
34
35
//
// ex13_19.h
// Exercise 13.19
//
// Created by pezy on 1/15/15.
// Copyright (c) 2015 pezy. All rights reserved.
//
// Does your Employee class need to define its own versions of the copy-control members?
// If so, why? If not, why not?
// Implement whatever copy-control members you think Employee needs.
//
// Answer: No, cause there really is no sensible meaning. employee can't copy in real world.
#ifndef CP5_ex13_19_h
#define CP5_ex13_19_h
#include <string>
using std::string;
class Employee {
public:
Employee();
Employee(const string &name);
Employee(const Employee&) = delete;
Employee& operator=(const Employee&) = delete;
const int id() const { return id_; }
private:
string name_;
int id_;
static int s_increment;
};
#endif