What is conversion operator?
Class can have a public method for specific data type conversions. for example: class Boo { double value; public: Boo(int i ) operator double() { return value; } }; Boo... Read more »
Class can have a public method for specific data type conversions. for example: class Boo { double value; public: Boo(int i ) operator double() { return value; } }; Boo... Read more »
There is no way for the compiler to verify that the macro parameters are of compatible types. The macro is expanded without any special type checking. If macro parameter... Read more »
auto register static extern auto: the default. Variables are automatically created and initialized when they are defined and are destroyed at the end of the block... Read more »
They are.. const volatile mutable Const keyword indicates that memory once initialized, should not be altered by a program. volatile keyword indicates that the value... Read more »
a) Using const protects you against programming errors that inadvertently alter data. b) Using const allows function to process both const and non-const actual arguments,... Read more »
Provided that function parameter is a “const reference”, compiler generates temporary variable in following 2 ways. a) The actual argument is the correct type,... Read more »
When you define only function prototype in a base class without and do the complete implementation in derived class. This base class is called abstract class and... Read more »
The term alignment primarily means the tendency of an address pointer value to be a multiple of some power of two. So a pointer with two byte alignment has a zero... Read more »
Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The... Read more »
A class that is used to traverse through the objects maintained by a container class. There are five categories of iterators: input iterators, output iterators,... Read more »
A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic... Read more »
It is a process during exception handling when the destructor is called for all local objects in the stack between the place where the exception was thrown and where... Read more »
The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only... Read more »
With the C++ language, you can overload functions and operators. Overloading is the practice of supplying more than one definition for a given function name in the... Read more »
To override a method, a subclass of the class that originally declared the method must declare a method with the same name, return type (or a subclass of that return... Read more »
The this pointer is a pointer accessible only within the member functions of a class, struct, or union type. It points to the object for which the member function... Read more »
The code has two built-in pitfalls. First, if it executes in a member function for an extern, static, or automatic object, the program will probably crash as soon... Read more »
Virtual functions are implemented using a table of function pointers, called the vtable. There is one entry in the table per virtual function in the class. This... Read more »
The process of encoding the parameter types with the function/method name into a unique name is called name mangling. The inverse process is called demangling. For... Read more »
A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point... Read more »