Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //hashtable.h
- #pragma once
- #include <iostream>
- #include <map>
- #include <iterator>
- using namespace std;
- template<class kType,class vType>
- class hashtable
- {
- private:
- map<kType,vType> *table;
- public:
- hashtable(kType k, vType v);
- ~hashtable();
- };
- //hashtable.cpp
- #include "hashtable.h"
- template<typename kType, typename vType>
- hashtable::hashtable()
- {
- // ??? Compiler Error C2955 ('hashtable': use of class template requires template argument list)
- }
- template<typename kType, typename vType>
- hashtable<kType, vType>::hashtable(kType k, vType v)
- ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
- чтобы соответствовало объявлению в классе
Add Comment
Please, Sign In to add comment