C++多态与虚拟:函数重载(Function Overloading)

重载(Overloading):所谓重载是指不同的函数实体共用一个函数名称。例如以下代码所提到的CPoint之中,有两个member functions的名称同为x(): 1 class CPoint{ 2 3 public: 4 float x(); 5 void x(float xval); 6

posted on 2024-04-24 23:00  阮春义  阅读(106)  评论(0编辑  收藏  举报

导航