Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "hash.h"
- void countNames(HashTable &table, string path) {
- ifstream text(path);
- string name;
- userInfo target;
- while (getline(text,name)) {
- table.hashFind(name,target);
- target.count++;
- }
- }
- int main(){
- setlocale(LC_ALL, "Russian");
- string path;
- cout << "Enter the path" << endl;
- getline(cin,path);
- int size;
- cout << "Enter the size of the table" << endl;
- cin >> size;
- HashTable table(size);
- table.form(path);
- cout << "Forming is done"<<endl;
- cout << "Enter the path" << endl;
- getline(cin,path);
- countNames(table,path);
- table.print();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement