Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 460 Bytes

File metadata and controls

31 lines (25 loc) · 460 Bytes

Move Constructor

IntVector::IntVector(IntVector&& v){
	max = v.max;
	size = v.size;
	arr = v.arr;

	// Return data to default -- NULL
	// So the other arr isnt holding 
	// garbage values
	v.size = v.max = 0;
	v.arr = nullpt;
}

Print Linked List In Reverse

void PrintReverse(Node* t){
	// pass in the node and rely on 
	// the stack to print in reverse
	if(t != null){
		PrintReverse(t->next);
		cout << t->data;
	}
}