Explicit Constructor with program in C++

Explicit constructor-:

1 argument parameterized constructor is made explicit by placing a keyword “explicit”, so that no automatic conversion of basic type to class type data takes place.

 

output-:

hr=…

min=…

sec=…

check the output and comment what values you got.

We have completed all the tutorials of operator overloading.

Be the first to comment

Leave a Reply

Your email address will not be published.


*