12.07.2015 Views

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

C++ - VideoTutorials-bg.com

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

template stack::~stack(){delstack();}template stack::stack(stack const & r){copy(r);}template stack& stack::operator=(stack const& r){if (this != &r){delstack();copy(r);}return *this;}template void stack::delstack(){item *p;while (start){p = start;start = start->link;delete p;}}template void stack::copy(stack const & r){if (r.start){item *p = r.start,*q = NULL,*s = NULL;start = new item;start->inf = p->inf;start->link = q;q = start;p = p->link;104

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

Saved successfully!

Ooh no, something went wrong!