小朋友学C++(12):多态

论坛 期权论坛 区块链     
海天一树X   2018-12-29 15:26   2609   0


先编写函数:[code]#include  using namespace std; class Shape{   protected:      int width, height;      
  public:      Shape( int a = 0, int b = 0)      {         width = a;
        height = b;
     }      
     int area()     
{         cout

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:
帖子:
精华:
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP