![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
xunxun523
这个作者很懒,什么都没留下…
展开
-
c++抽象类
c++抽象类: 凡是含有纯虚函数的类就是抽象类。 例: #ifndef __c_______CommonClass__ #define __c_______CommonClass__ #include class Person { public: virtual void info()const = 0; //存虚函数 则Person为抽象类 }原创 2015-03-06 16:36:59 · 567 阅读 · 0 评论 -
c++抽象类实现OC中的协议
OC中协议的实现: A中要调用B中的方法,通过delegate(代理)调用协议的方法来实现。 下面看C++中怎么实现: 一、先定义一个协议类 该类是一个抽象类 #ifndef __AppDelegateCplus__AppProtocol__ #define __AppDelegateCplus__AppProtocol__ //c++实现 oc的代理协议 #in原创 2015-03-06 18:03:53 · 1460 阅读 · 0 评论