文件名称:chongzauhanshu
介绍说明--下载内容均来自于网络,请自行研究使用
定义Name类的重载赋值函数。#include<iostream.h>
#include<string.h>
class Name
{ public :
Name ( char *pN )
Name( Name & )
Name& operator=( Name& )
~ Name()
protected :
char *pName
int size
}
Name::Name ( char *pN )
{ cout <<" Constructing " << pN << endl
pName = new char[ strlen( pN ) + 1 ]
if( pName != 0 ) strcpy( pName,pN )
size = strlen( pN )
}-Name class definition overloaded assignment function.# Include
#include<string.h>
class Name
{ public :
Name ( char *pN )
Name( Name & )
Name& operator=( Name& )
~ Name()
protected :
char *pName
int size
}
Name::Name ( char *pN )
{ cout <<" Constructing " << pN << endl
pName = new char[ strlen( pN ) + 1 ]
if( pName != 0 ) strcpy( pName,pN )
size = strlen( pN )
}-Name class definition overloaded assignment function.# Include
(系统自动生成,下载前可以参看下载内容)
下载文件列表
定义Name类的重载赋值函数。.txt