answersLogoWhite

0


Best Answer

You are referring to class constructors however constructors are not functions of any kind; they have no return type (not even void), thus we cannot take the address of a constructor. Moreover, constructors do not actually construct the storage area; an object's memory is allocated automatically at the point the object is instantiated. Constructors are best thought of as being object initialisers, which is really the final part of the construction process.

Unlike ordinary functions, constructors also include an initialisation section which is executed implicitly even when no initialisation section is specified. The initialiser section is a list of constructors (technically, initialisers). If a non-static member or base class has no initialiser specified, that member or base is default constructed. The order of construction is always base before member (in the order specified by the class declaration). Once the initialisation section is complete, the constructor body executes. In most cases, constructor bodies are empty {} however we can use them to perform additional initialisation that cannot be easily performed by the initialisation section.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a special member function that constructs storage area for the data member of an object?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What is constructor in cplusplus?

A constructor is a special member function which have same name as the class name.`


How the member function can be undefined?

You cannot undefine a member function.


What is member fusion in c plus plus?

If you are asking about member functions. When we declare a function inside a class then that function becomes member function of that class and this function can access the whole class


In the ordered pair x y the value of y is a member of the?

x is a member of the function's domain, y is a member of the function's range.


What is the difference between friend function and normal member function?

We can access a Friend function from any other class in which friend function is introduced or declared even if the other class is not a member of first class. But when we use normal member function, we can have its access only in the derived classes of the first class. This is the basic difference between a friend function and a normal member function.


Can the members of the domain be in the members of the range and be a function?

Yes, the domain must correspond to only one member of the range in order to be a function in a member of the domain goes to more than one member of the range it then is a relation and not a function A function is a relation but a relation isnt always a function


How do you get special seeds in moshi monsters without being a member?

You can't get any special seeds if you are not a member.


How do you differentiate between a member function and normal function?

A normal function is any function that is not a member of any class. Normal functions that operate upon a class are referred to as non-member functions, however a non-member function can also be a member of another class. Any class may declare any non-member function to be a friend of the class, in which case the function becomes a friend function.A member function is a member of a class and may be declared static or non-static. Non-static member functions have the following 3 properties:Private access to the class members.Scoped to the class.Must be invoked against an object of the class (has a 'this' pointer).Static member functions have the first two properties only while friend functions have the first property only. Non-member functions that are not friends of the class have none of these properties.


Can static member function be overloaded?

Yes. Any function can be overloaded. However you cannot override a static member function. Only instance members can be overridden.


Is the function member a objective complement?

No, "member" is not an objective complement in this context. It is functioning as a predicate nominative, renaming the subject "function."


What types of functions cannot be made virtual?

Static member functions, member function templates and constructors cannot be virtual.


Is it True or False that Variables declared in the particular member function are know as data members and can be used in all member functions of the class?

False. Variables declared within a particular member function are local to that function, and are automatically allocated and deallocated at entry and exit of the function.