line 1 Error: declaration of A(int) constructor with the "explicit" keyword prevents implicit casting.
line 2 Correct: the parameter-less constructor A() is called.
line 3 Correct: А(int) constructor is called explicitly
line 4: Correct: А(int) constructor is called explicitly
line 5 Correct: B(int) constructor defines implicit casting
line 6 Correct: B(int) constructor is called
line 7 Error: the parameter-less constructor B() is not defined, and is not generated automatically, since a non-default constructor is present.
Login in to like
Login in to comment