What is an explicit constructor? C++

Q

What is an explicit constructor? C++

✍: Guest

A

A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.

2012-03-21, 2699👍, 0💬