检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:李欣然[1] 赵山林[1] Li Xinran Zhao Shanlin(North University of China, College of Computer and Control Engineering, Taiyuan, Shanxi 030051, China)
机构地区:[1]中北大学计算机与控制工程学院,山西太原030051
出 处:《计算机时代》2017年第2期57-59,共3页Computer Era
摘 要:C++语言程序设计课程中,多态性分为两类。一是静态多态,通过函数重载实现,解决自定义数据类型运算问题;二是动态多态,通过虚函数实现,提高了程序的可扩充性。通过实例分析出利用函数重载实现静态多态的方法以及利用虚函数产生动态多态的条件。In the course of C ++ Programming, there are two kinds of polymorphisms. One is static polymorphism which is implemented through function overloading to solve the custom data types operations; the other is dynamic polymorphism which is implemented through virtual function to improve the scalability of the program. In this paper, examples are used to analyze the method of using function overloading to implement static polymorphism and the conditions of using virtual function to produce dynamic polymorphism.
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.134.247.168