QuesHub > 函数 > 类中 > 将其 > ASK DETAIL

Can a constructor can be overloaded?

Julian Davis | 2023-06-09 06:18:37 | page views:1345
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Charlotte Patel

Studied at the University of Tokyo, Lives in Tokyo, Japan.
A default constructor cannot be overloaded in the same class. This is because once a constructor is defined in a class, the compiler will not create the default constructor. Thus, an attempt to overload the default constructor will effectively remove it from the class.Jun 22, 2014
2023-06-13 06:18:37

Lucas Taylor

QuesHub.com delivers expert answers and knowledge to you.
A default constructor cannot be overloaded in the same class. This is because once a constructor is defined in a class, the compiler will not create the default constructor. Thus, an attempt to overload the default constructor will effectively remove it from the class.Jun 22, 2014
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4