摘要: #include <iostream>using namespace std;void main(){int *p,**pp;int n = 100;p = &n;pp = &p;cout << *p << " " << **pp << endl;//输出 100 100int tem;cin >> tem;} 阅读全文
posted @ 2013-06-12 20:54 Predator 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;class Animal{private:intm_nTotal;Animal(){m_nTotal = 100;};public: ~Animal(){};public :static Animal Instance(){Animal instance = Animal();return instance;}void ShowType();void Eat();void Walk();void Sleep();};void Animal::ShowType(){cout << "A 阅读全文
posted @ 2013-06-12 19:37 Predator 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;template <class T>class Assistant{private:friend T;Assistant(){};~Assistant(){};};class Animal:virtual public Assistant<Animal>{public:Animal(){};~Animal(){};void ShowType();void Eat();void Walk();void Sleep();};void Animal::ShowType(){cout &l 阅读全文
posted @ 2013-06-12 19:22 Predator 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;void ChangeArray(int p[]);char * StrCpy(char *pSource);void main(){int datas[4]={ 1, 2, 3, 4};ChangeArray(datas);for(int i =0; i> tem;}char * StrCpy(char *pSource){int i= 0;int len = 0;while(pSource[i]!='\0'){i++;len++;}char *pDestination = new char[len + 1];i 阅读全文
posted @ 2013-06-12 14:46 Predator 阅读(266) 评论(0) 推荐(0) 编辑