All pastes #440681 Raw Edit

Stuff

public cpp v1 · immutable
·published 2007-04-15 06:17 UTC
rendered paste body
int& List::operator[](int pos) const{	Node* temp;	temp = head;	if(pos >= list_size)		throw "Invalid array index";	while(pos-- > 0)		temp = temp->getNext();		int value = temp->getData();	return value;}int List::size() const{	return list_size;}