浅谈C++中用函数重载实现类型转换

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/endeavor_he/article/details/71090688

格式:

operator int()

{

return ;

}



输出结果:


至此你们应该能明白C++中怎么利用函数重载实现数据类型转换了!

扫描二维码关注公众号,回复: 5364785 查看本文章

猜你喜欢

转载自blog.csdn.net/endeavor_he/article/details/71090688