hash.h :
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include <QtGui>
#include <QString>
#include <QHash>
class Employee
{
public:
Employee() {}
Employee(const QString &name, const QDate &dateOfBirth);
private:
QString myName;
QDate myDateOfBirth;
};
inline bool operator==(const Employee &e1, const Employee &e2)
{
return e1.name() == e2.name()
&& e1.dateOfBirth() == e2.dateOfBirth();
}
inline uint qHash(const Employee &key)
{
return qHash(key.name()) ^ key.dateOfBirth().day();
}
#endif // EMPLOYEE_H
hash.cpp:
#include "hash.h"
#include <QtGui>
#include <QHash>
#include <QString>
Employee::Employee(const QString &name, const QDate &dateOfBirth)
{
QHash<QString, Employee *> hash;
}
Покажите плз ошибки, очень надо, за ранее благодарен.