home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_09
/
1009102a
< prev
next >
Wrap
Text File
|
1992-07-07
|
302b
|
27 lines
Listing 3
#include <iostream.h>
#include <string.h>
class String
{
...
public:
String(const String &s);
...
private:
size_t len;
char *str;
};
String::String(const String &s)
{
len = s.len;
str = new char[len + 1];
strcpy(str, s.str);
}
----------