- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
class CmyBuffaer{};
template< typename TYPE > CmyBuffaer& operator,( CmyBuffaer& buffer, typename TYPE arg);
template<> CmyBuffaer& operator,<double>( CmyBuffaer& buffer, double arg)
{
printf("%f",arg);
return buffer;
}
template<> CmyBuffaer& operator,<const char*>( CmyBuffaer& buffer, const char* arg)
{
printf("%s",arg);
return buffer;
}
template<> CmyBuffaer& operator,<int>( CmyBuffaer& buffer, int arg)
{
printf("%i",arg);
return buffer;
}
//...
CmyBuffaer(),34.5,"+",54,"+\n";
На этот раз не у нас, а у вас.