摘要:
#include"stdafx.h"#include <iostream.h>#include <string.h>template <class T> classVector{ T *v; int sz;public: Vector(int s) { v=new T[s]; sz=s; } int size( ) { return sz; } T&... 阅读全文
posted @ 2010-02-09 21:15
o无尘o
阅读(195)
评论(0)
推荐(0)
摘要:
#include"stdafx.h"#include <fstream.h>#include <string.h>int main(int argc, char* argv[]){ ofstream of; of.open("ofstream.txt", ios::out | ios::binary); if ( !of.fail()) { of << 10... 阅读全文
posted @ 2010-02-09 20:52
o无尘o
阅读(215)
评论(0)
推荐(0)
摘要:
#include"stdafx.h"#include <iostream.h>#include <string.h>#include <strstrea.h>class Student{public: Student(const char *pStr,int nAge = 20) : m_nAge(nAge) { if ( pStr == NULL ) { //... 阅读全文
posted @ 2010-02-09 20:51
o无尘o
阅读(246)
评论(0)
推荐(0)
摘要:
#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
阅读(194)
评论(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
阅读(190)
评论(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
阅读(158)
评论(0)
推荐(0)
浙公网安备 33010602011771号