C++
bliuqing2009
这个作者很懒,什么都没留下…
展开
-
C++构造函数
[code="C++"]class testint {public: testint(); testint(int b); //testint(testint& another); ~testint();private: int i;};////////////////testint::testint(){ cout2009-05-21 15:09:59 · 84 阅读 · 0 评论 -
C++构造函数 拷贝赋值
class MyString {public: MyString(); MyString(int newsize); MyString(const MyString& ms); const MyString& operator=(const MyString& ms); virtual ~MyString();private: int *ptr; int ...2009-05-21 16:09:14 · 95 阅读 · 0 评论 -
虚函数
【转】http://hi.baidu.com/douglax/blog/item/4b07c3f7198e7f26730eec62.html虚函数表 对C++ 了解的人都应该知道虚函数(Virtual Function)是通过一张虚函数表(Virtual Table)来实现的。简称为V-Table。 在这个表中,主是要一个类的虚函数的地址表,这张表解决了继承、重载的问题,保证其容真实反应实...原创 2009-06-03 16:56:24 · 96 阅读 · 0 评论 -
c++虚函数
class employee{public: employee(){ cout << "employee construction" << endl; } virtual ~employee(){ cout << "employee destruction" << endl; }virtual fuc1() { cout <<原创 2012-01-03 15:37:45 · 136 阅读 · 0 评论 -
简单字符串类实现
[转 http://www.dogame.com.cn/gamerc/jc_show.php?id=6051】main函数:#include <iostream>#include "strings.h"using namespace std;int main(){ Strings s3; Strings s4; Strings s5; s3.display(); String...原创 2012-02-28 22:03:19 · 145 阅读 · 0 评论