08 2024 档案

摘要:文章见:https://blog.csdn.net/whahu1989/article/details/82078563 阅读全文
posted @ 2024-08-15 22:55 BinaryPrinter 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1. 作用 类通过自定义的类型转换运算符,可以将一个类型转换成另一个类型。例如将自定义的Student类转换成std::string类。 虽然在格式上和运算符重载类似,但运算符重载是一个成员函数,而类型转换运算符不是,因为没有返回值。 2. 格式 operator type() [const]; t 阅读全文
posted @ 2024-08-01 23:39 BinaryPrinter 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示