Files
CSCI-1200/lectures/11_list_implementation/list_main.cpp
2024-02-13 13:18:21 -05:00

30 lines
565 B
C++

#include <iostream>
//#include <list>
#include "list.h"
int main(){
// dslist is a template, not a type.
dslist<std::string> teams;
teams.push_back("rpi");
teams.push_back("wpi");
teams.push_back("yale");
teams.push_back("brown");
teams.push_back("harvard");
dslist<std::string>::iterator itr;
for(itr = teams.begin(); itr != teams.end(); itr++){
std::cout << *itr << std::endl;
}
std::cout<<"==============="<<std::endl;
teams.pop_back();
for(itr = teams.begin(); itr != teams.end(); itr++){
std::cout << *itr << std::endl;
}
return 0;
}