12.07.2015 Views

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}else start = NULL;}Класът stack, реализиращ свързаното представяне на стек, има вида:struct elem{int inf;elem* link;};class stack{public:stack();~stack();stack(stack const &);stack& operator=(stack const & r);void push(int const&);int pop(int & x);bool empty() const;void print();private:elem *start;void delstack();void copy(stack const&);};stack::stack(){start = NULL;}stack::~stack(){delstack();}stack::stack(stack const & r){copy(r);}stack& stack::operator=(stack const& r){if (this != &r){delstack();copy(r);}return *this;85

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!