This repository was archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintStack.h
More file actions
46 lines (33 loc) · 1.3 KB
/
Copy pathintStack.h
File metadata and controls
46 lines (33 loc) · 1.3 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
/*--------------------------------------------------------------------------+
| Name: Jerome Richards |
| Course: CNS-2400 F01 |
| |
| Program: Integer Stack |
| File: intStack.h |
| |
| Class definition for Integer_stack |
+--------------------------------------------------------------------------*/
#ifndef INTSTACK_H
#define INTSTACK_H
#include <string>
using namespace std;
class Integer_stack
{
public:
enum stackCode { isSUCCESS, isUNDERFLOW, isOVERFLOW, isUNKNOWN };
static const int MAXSIZE = 20;
static const int THETOP = MAXSIZE - 1;
Integer_stack();
stackCode pusha( int theInt );
stackCode popa();
stackCode topa( int& theInt );
stackCode pushb( int theInt );
stackCode popb();
stackCode topb( int& theInt );
string getErrStr( stackCode theErr );
private:
int itsStack[ MAXSIZE ];
int top_a;
int top_b;
};
#endif