Exemple #1
0
int main()
{
    StringLinkedList<int> A;
    A.addFront(10);
    A.addFront(15);
    A.addAfter(12,10);
    A.addFront(13);
    cout<<"Front : "<<A.front()<<endl;
    A.printList();
    cout<<"After sorting : ";
    A.sortList();
    A.printList();
    cout<<"After reversing : ";
    A.reverseList();
    A.printList();
    A.removeFront();
    A.removeFront();
    A.printList();
    return 0;
}
Exemple #2
0
//Linked Stack functions
const string& LinkedStack::top() {
    return S.front();
}