单选题

下面代码错误的是:structA{A(int){}operatorbool...

发布于 2022-03-03 15:18:00

下面代码错误的是:
struct A
{
 A(int) { }
 operator bool() const { return true }
}
struct B
{
 explicit B(int) {}
 explicit operator bool() const { return true }
}
A a1(1)B b1(1)

登录后免费查看答案
关注者
0
被浏览
3
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看