求救·
我见了一个工程
quad.h
#ifndef _QUADRANGLE_H_//基类
#define _QUADRANGLE_H_
#include<iostream>
#include<string>
using namespace std;
class Quadrangle
{
public:
string name; //形体标识
double s;
string what();
void draw();
double area();//计算面积
private:
int width,length;
};
typedef Quadrangle *QUADPTR;
#endif
让后在此基础上继承了一个类
rect.h
#ifndef _RECT_H_
#define _RECT_H_
#include<iostream>
#include<string>
#include"quad.h"
using namespace std;
class Rectangle:public Parallelogram
{
public:
Rectangle (int w = 5, int h = 7);
~Rectangle();
string what();
double area();
void draw ();
private:
int width, height; //
};
#endif
这个错误是什么?
3\shiyan3\rect.h|8|error: expected class-name before '{' token|
3||=== Build finished: 2 errors, 0 warnings ===|