Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// example.cpp
- #include "LinkedList.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- cout << "Please enter some words (ctrl-d to stop):\n";
- LinkedList lst;
- int count = 0;
- string s;
- while (cin >> s) {
- count++;
- lst.add(lst.remove_non_letters(s));
- } // while
- cout << "\n" << count << " total words read in\n";
- cout << lst.size() << " unique words read in\n\n";
- lst.print();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement