object and classes in C++ | ऑब्जेक्ट्स एंड क्लासेज इन C++ - CYBER THIEVE

objects and classes in C++

class :

in C++ class is a building block that leads to object oriented programming. it is  a user defined data type , which holds it's own data members and member functions ,which can accessed and used by creating an instence of that class . A class is  like a blue print for an object.


object :

An object is an instance of a class when a class is defined no memory is allocated but when A object of that class is initialized memory is allocated.


members in a class :

class has two type of members in C++

 i)     data members :- 

 variables declares in class. It can be privet, public and protected is called data members of a class.

* NOTE :- by default data members are privet in class  *

ii) member functions :- 

functions declaired in the class are called member function of a class.

defining a class in C++ :-

syntax :

class class_name

    {

        access_specifier :

        data_members;

        access_specifier:

        member_functions()

    {

        member_function definition;

    };

*NOTE :- a class should be end with a semi colon (;) sign *


NOTE : If you find any mistake or weakness in my article please help us to improve our content.

Also Read Our Best Article on Networking :

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Ok, Go it!