数据结构学习(C++)——如何在一个链表中链入不同类型的对象[6]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 happycock 的 blog

       int radius;

       point center;

};

 

#endif

【说明】圆的类定义与实现。继承shape类的行为。

#ifndef line_h

#define line_h

 

#include "shape.h"

#include "point.h"

 

class line : public shape

{

public:

       void input()

       {

              cout << endl << "输入直线的参数";

              cout << endl << "输入端点1的坐标:" << endl;

              point1.put();

              cout << endl << "输入端点2的坐标:" << endl;

本文关键:数据结构 C++ 链表
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top