有个vs2010小问题,求帮解决
在vs2010里怎么不能实现这个语法啊:
CString str;
str+=nChar;
nChar是char类型的,在vc6.0怎么可以的,郁闷死了,+=不是隐式把Char转换成字符串了吗
CString str;
str+=nChar;
nChar是char类型的,在vc6.0怎么可以的,郁闷死了,+=不是隐式把Char转换成字符串了吗
作者: zhaoqingtao007 发布时间: 2011-06-15
应该是VS2010修改了CString类,CStringT类重载这些+=操作符
CStringT& operator+=( _In_ char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ unsigned char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ wchar_t ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ unsigned char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ wchar_t ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
作者: VisualEleven 发布时间: 2011-06-15
引用 1 楼 visualeleven 的回复:
应该是VS2010修改了CString类,CStringT类重载这些+=操作符
CStringT& operator+=( _In_ char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ unsigned char ch )
……
应该是VS2010修改了CString类,CStringT类重载这些+=操作符
CStringT& operator+=( _In_ char ch )
{
CThisSimpleString::operator+=( ch );
return( *this );
}
CStringT& operator+=( _In_ unsigned char ch )
……
对,确实是修改了。这个类
++
作者: bjtbjt 发布时间: 2011-06-15