📄 ch11virtualshapespart2.cpp
字号:
//Program 11-14 Virtual Shapes Part2
//File: Ch11VirtualShapesPart2.cpp
#include <iostream.h>
#include "Ch11VirtualShapesPart2.h"
int main()
{
cout << "\n The Virtual Shapes Program -- Part 2" << endl;
Shape *ptr_to_base[4];
Sphere MySphere;
Pyramid MyPyramid;
Cone MyCone;
Box MyBox;
ptr_to_base[0] = &MyCone;
ptr_to_base[1] = &MySphere;
ptr_to_base[2] = &MyPyramid;
ptr_to_base[3] = &MyBox;
for(int i = 0; i < 4; ++i)
{
ptr_to_base[i]->WhatAmI();
}
cout << "\n Ohhh This is getting easier! \n\n";
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -