English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Suppose you have an empty class:

class empty
{
}

What are the four (4) default functions of this class?

2006-08-29 13:09:05 · 3 answers · asked by ifoam 3 in Computers & Internet Programming & Design

Well, after research i find that they are:
Constructor
Deconstructor
Assignment Operator
Copy Constructor

Is this accurate? Can anyone point to some electronic text stating this?

2006-08-29 13:22:45 · update #1

3 answers

Yes those are the four default functions of a class.

1) Default constructor
2) Destructor
3) Copy constructor - Needed for initializing based on another object
4) Assignment - Needed for assigning value to the object

You can find a link to an article which talks about these at the source below.

Enjoy!

2006-08-29 14:42:10 · answer #1 · answered by Martyr2 7 · 0 0

1. Constructor
2. Destructor
3. Copy Constructor

I am not too sure of the fourth. But if there is one i think it is
4. overrided assignment operator.

2006-08-29 20:28:44 · answer #2 · answered by KD 1 · 0 0

Suppose you have an empty homework assignment..

Homework empty {
// still to be written
}

:)

2006-08-29 20:19:40 · answer #3 · answered by Valdis K 6 · 0 0

fedest.com, questions and answers