Learn C Language from the Best Tutors
Search in
These rules are instrumental when you design your class.
When you create/write a new class, you always think of 5 place holder methods in it.
Earlier it was three, but after C++ 11 it became 5.
They are:
Best case is to design a class so that you have a rule of 0. But it's not always possible.
It will depend on the nature of your class members. It's bad practice to have them as raw pointers because then you have to write these constructors carefully and also think about resource leakage. Sometimes, we make them shared pointer or unique pointer etc. to reduce our work of writing these constructors and methods. If your class members are themselves following the rule of 0,3,5 etc., then it will also affect your decision whether you have to give all 5 or 0 or 3.
In a nutshell, it's always a good practice to think about these five methods, whenever you write a new class.
Good question!!
read lessRelated Questions
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Lasya Infotech: An educational Training...
Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...
Brilliant Academy, a reputed B. Tech Tuition...
Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...
What is Applications Engineering all about?
Applications engineering is a hot trend in the current IT market. An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...
Top 5 Skills Every Software Developer Must have
Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today. In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...
Looking for C Language Classes?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for C Language Classes are on UrbanPro
The best Tutors for C Language Classes are on UrbanPro