#include <iostream>   
using namespace std;   
   
class Internet   
{   
public:   
    Internet(char *name,char *address)   
    {   
        cout<<"载入构造函数"<<endl;   
        strcpy(Internet::name,name);   
    }   
    Internet(Internet &temp)   
    {   
        cout<<"载入COPY构造函数"<<endl;   
        strcpy(Internet::name,temp.name);   
        cin.get();   
    }   
    ~Internet()   
    {   
        cout<<"载入析构函数!";   
    }   
public:   
    char name[20];   
    char address[20];   
};   
   
void main()   
{   
    Internet &a=Internet("中国软件开发实验室","www.cndev-lab.com");   
    cout<<a.name; 
    cin.get();   
}
posted on 2006-09-11 00:52  DAVID'S BLOG  阅读(282)  评论(0编辑  收藏  举报