标签:c++;
#include<iostream>
#include<string.h>
using namespace std;
class CMyString
{
public:
char* _str;
CMyString()
:_str(NULL)
{}
CMyString(char * str)
:_str(new[strlen(str)+1] )
{
strcpy(_str,str);
}
CMyString(CMySting& tmp)
:_str(new[strlen(tmp._str)+1])
{
strcpy(_str,tmp._str);
}
CMyString operator=(CMyString tmp)
{
swap(_str,tmp._str);
return *this;
}
};#include<iostream>
#include<string.h>
using namespace std;
singal::static singal* _this=NULL;
class singal
{
char* _str;
static singal* _this;
public:
static singal* GetSingal()
{
if(_this==NULL)
_this=getsingal();
return _this;
}
private:
singal* getsingal()
{
singal* tmp=new singal;
tmp->_
}
singal(){}
};标签:c++;
原文地址:http://shaungqiran.blog.51cto.com/10532904/1769712