コード例 #1
0
ファイル: singly.cpp プロジェクト: hihasan/Short-Code
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;
}
コード例 #2
0
ファイル: main.cpp プロジェクト: DaltheCow/CIS-277
//Linked Stack functions
const string& LinkedStack::top() {
    return S.front();
}