摘要:
阅读全文
摘要:
#pragma oncetemplate<typename T>class smart_pointer{private: T* m_pRawPointer;public: smart_pointer(T* pData) :m_pRawPointer(pData) {} //复制构造函数 smart_ 阅读全文
摘要:
try { for (int i = 0; i<1000; i++) { test1 = new Test(); cout << i << " new dog success..." << endl; } } catch (bad_alloc err) { cout << "fail:"<<err. 阅读全文
摘要:
#include <iostream> using namespace std; const int DefaultSize = 10; class Array{public: Array(int itsSize=DefaultSize); ~Array() { delete[] pType; } 阅读全文
摘要:
#include <iostream>#include <stdio.h> using namespace std; class IOException{};class FileException{};class UndefineError{}; void my_copy(const char* s 阅读全文
摘要:
#include <iostream>#include <stdio.h> using namespace std; void my_copy(const char* src_file, const char* dest_file){ FILE *in_file, *out_file; in_fil 阅读全文
摘要:
#include <iostream>#include <stdio.h> using namespace std; int my_copy(const char* src_file,const char* dest_file){ FILE *in_file, *out_file; in_file 阅读全文