-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbox.h
More file actions
54 lines (51 loc) · 1.06 KB
/
Copy pathbox.h
File metadata and controls
54 lines (51 loc) · 1.06 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef BOX_H
#define BOX_H
#include <iostream>
/*
//s06
struct Box
{
Box(int W, int H, int L=0);
Box();
Box(int W); // constructor
// Box() = default;
void disp(); // method
const int L, W, H; // member variable
};
*/
//s07
struct Box
{
Box(int L, int W, int H=0);
Box();
Box(int L); // constructor
Box(const Box& b);
// Box() = default;
~Box(); //destructor
void disp() const; // method
Box* setW(int w);
Box* setH(int w);
Box* setL(int w);
int getW() const { return W;}
int getL() const { return L;}
int getH() const { return H;}
// void setW(int w);
// void setH(int w);
// void setL(int w);
static inline size_t m_count{};
private:
int L, W, H; // member variable
};
// class Box
// {
// Public:
// Box(int L, int W, int H=0);
// Box();
// Box(int L); // constructor
// // Box() = default;
// void disp(); // method
// void setw(int w);
// private:
// int L, W, H; // member variable
// };
#endif