File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ namespace alg
3131private:
3232class QueueEmptyException : public std ::exception
3333{
34- public:
35- virtual const char * what () const throw()
36- {
37- return " Queue is empty." ;
38- }
34+ public:
35+ virtual const char * what () const throw()
36+ {
37+ return " Queue is empty." ;
38+ }
3939};
4040
4141private:
Original file line number Diff line number Diff line change @@ -32,20 +32,20 @@ class Stack
3232private:
3333class StackEmptyException : public std ::exception
3434{
35- public:
36- virtual const char * what () const throw()
37- {
38- return " stack is empty" ;
39- }
35+ public:
36+ virtual const char * what () const throw()
37+ {
38+ return " stack is empty" ;
39+ }
4040};
4141
4242class StackIndexOutOfBoundException : public std ::exception
4343{
44- public:
45- virtual const char * what () const throw()
46- {
47- return " Index out of bound." ;
48- }
44+ public:
45+ virtual const char * what () const throw()
46+ {
47+ return " Index out of bound." ;
48+ }
4949};
5050
5151uint32_t m_capacity;// the total capacity
Original file line number Diff line number Diff line change 66
77int main ()
88{
9- using namespace alg ;
9+ using alg::Queue ;
1010const int MAXELEMENT = 20 ;
1111Queue<int > Q (MAXELEMENT);
1212int i;
You can’t perform that action at this time.
0 commit comments