demo4.cpp 443 字节
Newer Older
wnma3mz's avatar
wnma3mz 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#include"List2.h"

#include<stdlib.h>
#include<iostream>
using namespace std;


int main(void) {
    Node node1;
    node1.data.name = "test1";
    node1.data.phone = "123456";
    Node node2;
    node2.data.name = "test2";
    node2.data.phone = "234567";

    List2 *pList = new List2();

    pList->ListInsertTail(&node1);
    pList->ListInsertTail(&node2);

    pList->ListTraverse();

    delete pList;
    pList = NULL;

    return 0;
}