-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdriver.cpp
More file actions
45 lines (35 loc) · 1.16 KB
/
Copy pathdriver.cpp
File metadata and controls
45 lines (35 loc) · 1.16 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
#include <string>
#include "slist.h"
using namespace std;
int main( ) {
SList<int> *intList = new SList<int>;
delete intList;
SList<string> facultyList;
facultyList.insert( "unknown" );
facultyList.insert( "erdly" );
facultyList.insert( "sung" );
facultyList.insert( "olson" );
facultyList.insert( "zander" );
facultyList.insert( "berger" );
facultyList.insert( "cioch" );
facultyList.insert( "fukuda" );
facultyList.insert( "stiber" );
facultyList.insert( "jackels" );
cout << "#faculty members: " << facultyList.size( ) << endl;
facultyList.show( );
cout << endl;
cout << "deleting unknown" << endl;
facultyList.remove( "unknown" );
cout << "#faculty members: " << facultyList.size( ) << endl;
facultyList.show( );
cout << endl;
cout << "finding stiber = " << facultyList.find( "stiber" ) << endl;
cout << endl;
cout << "create another list" << endl;
SList<string> studentList = facultyList;
cout << "finding stiber = " << facultyList.find( "stiber" ) << endl;
cout << "#faculty members: " << facultyList.size( ) << endl;
cout << endl;
cout << "cost of find = " << facultyList.getCost( ) << endl;
}