编译出错:redefinition of ...previous definition of ..
Userinfo.h:5: redefinition of `class Userinfo'Userinfo.h:5: previous definition of `class Userinfo'Userinfo.h:5: confused by earlier errors, bailing out在定义一个类Userinfo时出现了以上错误#include <QtCore>#include <QtNetwork>class Userinfo{ Q_OBJECT private: QString *username; QString *password; QHostAddress *serverIP; int port; QTcpSocket *tcpSocket; public: Userinfo(QString * username=0, QString * pwd=0, QHostAddress * serverIP=0, int port=0, QTcpSocket *tcpSocket=0); void getUsername(const QString * username); void getPassword(const QString * pwd); void getServerIP(const QHostAddress * serverIP); void getPort(int port); void getTcpSocket(const QTcpSocket * tcpSocket); }; 请高手指教,谢谢!