摘要:
#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&... 阅读全文
摘要:
#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... 阅读全文
摘要:
#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 ) { //... 阅读全文
摘要:
#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... 阅读全文
摘要:
#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... 阅读全文
摘要:
#include"stdafx.h"#include <iostream.h>#include <string.h>class DivideZero{public: //带参构造 DivideZero( const char* pStr ) { strcpy(szMessage, pStr); } //拷贝构造 DivideZero(const DivideZero &am... 阅读全文