All pastes #440691 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-04-15 06:34 UTC
rendered paste body
#include "node.h"#include <iostream>using namespace std;class List {	private: 		Node* head, *tail;		int list_size;	public:		List() { this->head = NULL; this->tail = NULL; list_size = 0; }		void insert(int);		int& operator[](int) const;		int size() const;		void reverse(void);};ostream& operator<<(ostream&, const List&);ostream& operator<<(ostream& out, const List& listObj) {	int i = 0;	for(i;i<listObj.size(); i++)		out << listObj.operator [](i);     return out;}