上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: #include"stdafx.h"#include <iostream.h>#include <string.h>//类描述异常信息class Matherr{protected: char m_szMsg[32];public: virtual const char *GetMsg()const { return m_szMsg; }};class Overflow... 阅读全文
posted @ 2010-02-09 19:55 o无尘o 阅读(186) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h"#include <iostream.h>classVector{private: int *p; int m_nLen;public: Vector(int nLen) { p = newint [nLen]; m_nLen = nLen; } ~Vector( ) { delete [] p; } int size() { retu... 阅读全文
posted @ 2010-02-09 19:44 o无尘o 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h"#include <iostream.h>#include <string.h>class DivideZero{public: //带参构造 DivideZero( const char* pStr ) { strcpy(szMessage, pStr); } //拷贝构造 DivideZero(const DivideZero &am... 阅读全文
posted @ 2010-02-09 18:37 o无尘o 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 文章来源:http://www.ttadd.com/diannao/HTML/235896.html Visual C++开发工具与调试技巧整理: 1.如何在Release状态下进行调试:   Project->Setting=>ProjectSetting对话框,选择Release状态。C/C++标签中的Category选General,Optimizations选Disable... 阅读全文
posted @ 2010-02-05 12:17 o无尘o 阅读(294) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h"#include <stdlib.h>#include <iostream.h>//整形数组//对元素进行管理的类,可以叫容器类template<typename T, int nSize = 5>class IntegerArray{private: T *m_pIntegerArray; //大小 int m_nSize;... 阅读全文
posted @ 2010-02-04 22:28 o无尘o 阅读(155) 评论(0) 推荐(0) 编辑
摘要: /*************************B.h*********************************************/#if !defined(AFX_B_H__21773A49_ECD0_4400_9640_F7C306E01F51__INCLUDED_)#define AFX_B_H__21773A49_ECD0_4400_9640_F7C306E01F51__... 阅读全文
posted @ 2010-02-04 22:25 o无尘o 阅读(193) 评论(0) 推荐(0) 编辑
摘要: /*模板(1)*/#include"stdafx.h"#include <iostream.h>#include <string.h>class A{ int m_nData;public: A(int nData ) : m_nData(nData) { } //重载 > intoperator>( const A& Obj ) { return (m... 阅读全文
posted @ 2010-02-04 22:18 o无尘o 阅读(184) 评论(0) 推荐(0) 编辑
摘要: /****************************Assoc.h**************************************/#if !defined(AFX_ASSOC_H__FBB8B380_5C3D_4A4D_A497_B45C77B2BDAE__INCLUDED_)#define AFX_ASSOC_H__FBB8B380_5C3D_4A4D_A497_B45C77... 阅读全文
posted @ 2010-02-04 21:24 o无尘o 阅读(260) 评论(0) 推荐(0) 编辑
摘要: /*运算符重载--智能指针*/#include"stdafx.h"#include <iostream.h>class CPerson{private: int m_nAge;public: void sayHello() { this->m_nAge = 10; cout << "sayHello" << endl; }};class PerPtr {p... 阅读全文
posted @ 2010-02-02 20:41 o无尘o 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: /*操作符重载(2)*/#include"stdafx.h"#include <iostream.h>#include <string.h>class MyInt{private: int m_nData; char* m_pStr;public: //转换构造函数 带参构造 MyInt( int nData ) { m_nData = nData; m_pStr = ne... 阅读全文
posted @ 2010-02-01 20:32 o无尘o 阅读(174) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页