Node.CPP
#pragma once
template<class T,class U>class Node
{
public:
public:
int key;
int key1;
T data;
int count;
Node<T,U> *panother;
};
Nodeh
#include "StdAfx.h"
#include "Node.h"
MyHash.h
#pragma once
#include "Node.h"
#include<string>
using namespace std;
template<class T,class U>
class MyHash
{
public:
Node<T,U>*p;
T nullvalue;
public:
void put(U key,T data);
T find(U key);
private:
int creat_hash(int num);
int creat_key(int num);
int creat_hash(string num);
int creat_key(string num);
int change_int(int n);
int change_int(string da);
public:
MyHash(void);
~MyHash(void);
};