C++ Class and Objects | Classes | constructors | Overloading constructors | C++ Programming in Tamil
Classes
Classes are an expanded concept of data structures: like data structures, they can contain data members, but they can also contain functions as members.
An object is an instantiation of a class. In terms of variables, a class would be the type, and an object would be the variable.
An access specifier is one of the following three keywords:
private, public or protected.
constructors
This constructor function is declared just like a regular member function, but with a name that matches the class name and without any return type; not even void.
Overloading constructors
a constructor can also be overloaded with different versions taking
different parameters
Uniform initialization
Member initialization in constructors
Pointers to classes
Classes defined with struct and union
Classes can be defined not only with keyword class, but also with keywords struct and union.
Keyword struct is same as class but the difference is that the members of
Struct are public by default and class are private by default
Keyword union is same as class but the difference is that the members of union are public by default
Union can store only one data member at a time
****************************************************************************
YouTube - / sriramasubramaniamnagarajan
Connect me @
instagram: / sriramasubramaniam
sololearn: https://www.sololearn.com/Profile/104...
PlayList:
MovieBuff - • Moviebuff
Hawkeye - • Hawkeye
C++ Programming - • C++ Programming
PHP Tutorial : • PHP Tutorial
JavaScript Tutorial - • JavaScript Tutorial
Python Classes and Objects - • Python Classes and Objects
Python CSV - • Python CSV
C programming - • C Programming Language
Python Programming - • Python Programming
Python Programs - • Python programs
DataBase Concepts - • DataBase Concepts
canva - https://www.canva.com/join/simplified...
#Cplusplus #Classes #constructors