base class undefined
// Reader.h: interface for the CReader class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_READER_H__DCAB46E5_37B7_4CB6_B0F4_5456E369EF61__INCLUDED_)
#define AFX_READER_H__DCAB46E5_37B7_4CB6_B0F4_5456E369EF61__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "User.h"
class CReader : public CUser
{
public:
CReader();
virtual ~CReader();
public:
};
#endif // !defined(AFX_READER_H__DCAB46E5_37B7_4CB6_B0F4_5456E369EF61__INCLUDED_)
上面是CReader类的头文件,下面是CUser类的头文件
////////////////////////////////////////////////////////////////
#if !defined(AFX_USER_H__E7674758_7D0F_420D_AB40_391E01ACBF48__INCLUDED_)
#define AFX_USER_H__E7674758_7D0F_420D_AB40_391E01ACBF48__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<iostream.h>
#include"whole.h"
#include"BookLinkList.h"
class CUser
{
public:
CUser();
virtual ~CUser();
public:
char ID[10];
char Name[10];
char Password[10];
int Role;
CUser *Next;
public:
virtual void Login();
void SearchBook();
};
#endif // !defined(AFX_USER_H__E7674758_7D0F_420D_AB40_391E01ACBF48__INCLUDED_)
明明定义了CUser类,但是编译时还是出现下面的错误:
error C2504: 'CUser' : base class undefined
[解决办法]
我编译通过- -巨汗。
[解决办法]