How to stop conversions among objects?

Answer Posted / kavitha

If any situation like that the constructor should build the
objects and should not get used for carrying out
conversions, In that situation we are required to use the
explicit keyword with the constructor.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3916


What are the stages in the development cycle?

776


Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1337


How can you quickly find the number of elements stored in a dynamic array?

801


Why do we need constructors in c++?

846


Is c++ still in demand?

874


Why was c++ created?

781


List the merits and demerits of declaring a nested class in C++?

794


Why Pointers are not used in C++?

808


Why is c++ not purely object oriented?

768


What is the C-style character string?

809


Should a constructor be public or private?

751


Explain 'this' pointer and what would happen if a pointer is deleted twice?

833


What do you mean by public protected and private in c++?

789


What do you understand by pure virtual function? Write about its use?

768