Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

keyword_explicit

Understanding of explicit keyword behaviour in cpp prog.

In general if a class has a constructor which can be called with a single argument, then this constructor becomes conversion constructor because such a constructor allows conversion of the single argument to the class being constructed.

We can make the constructor explicit(doesn't allow implicit conversions) with the help of explicit keyword.

To get clear understanding click here!.