C++ 类模板
摘要:
下面给出了关于类成员的初始化,指向类成员的指针,const用法和引用用法的模板。#include<iostream> //不是iostream.husing namespace std;class BOX{ public: BOX (int h=10, int w=20, int l=30);//带参数的构造函数,并指定h,w,l的默认值 int volume(); void outputoutput(); void const_outputoutput() const; //const 要放在最后 void get_time(); ~BOX() // D... 阅读全文
posted @ 2013-01-02 12:44 cosmo89929 阅读(237) 评论(0) 推荐(0)
浙公网安备 33010602011771号