1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <iostream>
#include <string>
#include <iomanip>
#include "DoublyLinkedList.h"
using namespace std;
int main ()
{
int list [] = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31};
DoublyLinkedList *list;
Node *current;
list = new DoublyLinkedList (list[0]);
for (size_t i = 1; i < strlen(list); i++)
list -> addNodeAfter (list[i]);
system ("pause");
return 0;
}
|