摘要:
/*操作符重载(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... 阅读全文
摘要:
/*操作符重载*/#include"stdafx.h"#include <iostream.h>class Interger{private: int m_nData;public: int GetData() const { return m_nData; } intAdd( int nData ) { return m_nData + nData; }public: //带参构造 ... 阅读全文