What is an explicit constructor?

Answer Posted / nimish singh

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.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should the member functions which are made public in the base class be hidden?

759


What is ofstream c++?

806


What is the difference between a reference and a pointer?

809


What is the difference between strcpy() and strncpy()?

835


What are the basic data types used in c++?

758


Explain the operation of overloading of an assignment operator.

888


What is data hiding c++?

769


What do you mean by inheritance in c++?

807


What is the size of a vector?

797


What is java and c++?

870


Which software is best for programming?

862


What is insertion sorting?

846


how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

2071


Who created c++?

775


How is static data member similar to a global variable?

818