What are functions provided by the compiler in a class?

S

Sunil Varma

Hi,

Can you give me the list of functions that are supplied by the compiler
in a class?

To my knowledge the following are supplied,

Default Constructor,
Copy Constructor,
Destructor,
Overloaded Assignment Operator.

Apart from the above there are two more functions which are supplied it
seems, can anyone figure them out.

Thanks in advance.

Regards
 
V

Victor Bazarov

Sunil said:
Can you give me the list of functions that are supplied by the
compiler in a class?

What does your C++ textbook say?
To my knowledge the following are supplied,

Default Constructor,
Copy Constructor,
Destructor,
Overloaded Assignment Operator.

It's called a "copy assignment operator".
Apart from the above there are two more functions which are supplied
it seems, can anyone figure them out.

"It seems"? From what does it seem so?

V
 
S

Sunil Varma

I was told by one of my friends that there are totally six functions
that will be provided by the compiler, by default.
But I could list out only four of them.
He asked me find out myself.
 
V

Victor Bazarov

Sunil said:
I was told by one of my friends that there are totally six functions
that will be provided by the compiler, by default.
But I could list out only four of them.
He asked me find out myself.

(a) Don't top-post

(b) Tell your "friend" to either share the "knowledge" with you or stuff it.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top