10.09.2013 Views

Dictaat SOPX3 - Harry Broeders

Dictaat SOPX3 - Harry Broeders

Dictaat SOPX3 - Harry Broeders

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

exit(-1);<br />

// no valid return possible<br />

}<br />

return p->data;<br />

}<br />

template bool StackWithList::empty() const {<br />

return p==0;<br />

}<br />

template bool StackWithList::full() const {<br />

return false;<br />

}<br />

template StackWithList::Node::Node(const T& t, Node* n):<br />

data(t), next(n) {<br />

}<br />

#endif<br />

Een programma om deze implementatie te testen:<br />

#include <br />

#include "stacklist.h"<br />

using namespace std;<br />

int main() {<br />

StackWithList s;<br />

char c;<br />

cout

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

Saved successfully!

Ooh no, something went wrong!