代码搜索:Stack
找到约 10,000 项符合「Stack」的源代码
代码结果 10,000
www.eeworm.com/read/461147/7232621
cpp stack.cpp
#include "Stack.h"
Error_code Stack::push(const Stack_entry &item)
/*
Pre: None.
Post: If the Stack is not full, item is added to the top
of the Stack. If the Stack is full,
an Error_code of o
www.eeworm.com/read/461147/7232634
obj stack.obj
www.eeworm.com/read/461147/7232635
sbr stack.sbr
www.eeworm.com/read/461147/7232653
h stack.h
#include "Polynomial.h"
const int maxstack = 10; // small value for testing
typedef Polynomial Stack_entry;
class Stack
{
public:
Stack();
bool empty() const;
int size() const;
bool f
www.eeworm.com/read/461147/7232673
h stack.h
#ifndef STACK_H_
#define STACK_H_
enum Error_code{success,underflow,overflow};
typedef int Stack_entry;
const int maxstack =3;
class Stack {
public:
Stack();
bool empty() const;
Er
www.eeworm.com/read/461147/7232678
obj stack.obj
www.eeworm.com/read/461147/7232683
cpp stack.cpp
#include "stack.h"
Stack::Stack()
{
count = 0;
}
bool Stack::empty() const
{
bool outcome = true;
if (count > 0) outcome = false;
return outcome;
}
Error_code Stack::pop()
{
www.eeworm.com/read/461147/7232715
obj stack.obj
www.eeworm.com/read/461147/7232718
cpp stack.cpp
#include
#include
using namespace std;
int main( )
/* Pre: The user supplies an integer n and n decimal numbers.
Post: The numbers are printed in reverse order.
Uses: The ST
www.eeworm.com/read/460749/7241740