64,654
社区成员
发帖
与我相关
我的任务
分享
template <class type>
class BaseString
{
public:
BaseString <type>& operator=(const BaseString <type>& str) ;
BaseString()
{}
BaseString(type* )
{
}
};
template <class type>
BaseString<type>& BaseString<type>::operator=(const BaseString<type>& str)
{
return (*this);
}
int main()
{
BaseString <char> str1;
BaseString <char> str2("12");
str1 = str2;
return 0;
}
template <typename type>
void operator =(const BaseString<type>&str)
{
//this-> 成员=str.成员; 应该是这样的吧!
]