在栈Stack的定义中,类型Error_code的目的是什么?在栈Stack的实现中,类型Error_code包含有哪2种具体的值?这两种值分别对应什么情况?
查看答案
voidExtended_stack::clear()/*Pre: None.Post: If theExtended_stack is not empty, all entries are removed.*/{ }boolExtended_stack::full() const/*Pre: None.Post: If theExtended_stack is full, true is returned.Otherwise false is returned.*/{ }int Extended_stack::size()const/*Pre: None.Post:Returns the number of entries in the Extended_stack*/{ }
在栈Stack的应用案例(Calculator)中,表达式采用了什么形式?这种形式的好处是什么?该案例提供了哪7种操作?
在栈Stack的应用案例(Calculator)中,提供了5个函数,请简述各函数的功能及实现方法?
在队列Queue的定义中,数据为什么将可见性定义为protected?