Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ContactList.cpp
- *
- * Created on: Jul 23, 2012
- * Author: Derek
- *
- * Linked List Example
- */
- #include "ContactList.h"
- using namespace std;
- ContactList::ContactList():head(NULL), size(0)
- {}
- void ContactList::addToHead(Contact* newOne)
- {
- if(head == NULL)
- {
- head = newOne;
- }
- else
- {
- newOne->next = head;
- head = newOne;
- }
- size++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement