用指向基类对象的指针输出数据
2008-01-03 09:28
465 查看
#include "stdafx.h"#include<iostream>#include<string>using namespace std;class student{private: int num; int age; float score;public: student(int ,int ,float); void display();};//定义构造函数 student::student(int n,
相关文章推荐
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 用指向基类对象的指针输出数据
- 【4.17】建立一个对象数组,内放6个学生的数据(学号、成绩),用指针指向数组首元素,输出第2,4,6个学生的数剧。
- 建立一个对象数组,内放5个学生数据(学号、成绩),设立一个函数max,用指向对象的指针作函数参数,在max函数中找出5个学生中成绩最高者,并从输出学号。
- Chapter9——建立一个对象数组,内放5个学生的数据(学号,成绩),设立一个函数max,用指向对象的指针做函数参数,在max函数中找出5个学生中成绩最高者,并输出其学号。
- 4,17建立对象数组,存放6个学生数据,指针指向数组首个元素,输出2,4,6个学生数据
- 建立一个对象数组,内放5个学生的数据(学号,成绩),用指向对象的指针做函数参数,在max函数中找出5个学生中成绩最高者,并输出其学号。
- 建立一个对象数组,内放5个学生数据(学号、成绩),用指针指向数组首元素,输出学生的数据
- C++ 基类指针指向派生类对象
- 为什么要用基类指针指向派生类对象?