STL:类模板
来源:互联网 发布:win10怎么优化内存 编辑:程序博客网 时间:2024/04/27 23:27
// hello.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"template<typename T>class Motor{public:Motor(){}~Motor(){}public:void Run();void Proc();void Proc2(){int cc =3; }};template<typename T>void Motor<T>::Run(){((T *) this)->Proc();((T *) this)->Proc2();}class MotorBike:public Motor<MotorBike>{public:MotorBike(){}~MotorBike(){}public:void Proc(){int c = 2;}void Proc2(){int cc =3; }};int _tmain(int argc, _TCHAR* argv[]){MotorBike objMotor;objMotor.Run(); //MotorBike::Proc >>MotorBike::Proc2();return 0;}
0 0
- STL模板类总结
- STL模板类总结
- STL-栈类模板
- STL:类模板
- 类stl的btree模板
- STL模板类的继承
- [STL]模板(类&函数)
- STL——类模板
- C++:STL模板类vector
- STL中的模板类pair
- STL模板
- STL-模板
- 模板 STL
- STL模板
- STL中的模板类map的介绍
- STL中的模板类pair 和map
- STL中的模板类pair 和map
- C++ STL模板与类成员指针
- SharePoint 2013 IT Professional——如何配置Anonymous Access
- DOM(一)-11-(document获取节点byId)
- main中int argc, char **argv 含义
- JQuery HTML之捕获、设置、元素添加、元素删除
- ETL kettle 工具使用例子
- STL:类模板
- 读取bq26500电池电量 Driver
- 智能快速充电
- 性能优化:使用SparseArray代替HashMap<Integer,Object>
- eclipse 远程 debug
- VS2005调试技巧集合
- android判断网络是否可用
- DOM(一)-12-(document获取节点byName)
- 暑假-动态规划 III-I - Function Run Fun