Blog Introductions

In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. C++ Classes and C++ object orriented programing and C++ OOP  | C++ Tutorials Bestitworrior




 C++ object orriented programing 



C++ Tutorials







C++ Classes and C++ object orriented programing and C++ OOP  | C++ Tutorials Bestitworrior - In c++ we study about object-orriented programing known as OOP. OOP stands for object oriented programing . In oop we work on an object.Object define as any things which have some properties and functions.For - exemple a car is a object which have propertis color,height ,weight , size etc and having function car can start , stop , drive , speed drive ,show drive etc .Object have classe in which we declear object properties and methods.In c++ classes use to define the objects propertis and methods.

Some Key Points of C++ Class


  1. Class Use to define the object
  2. OOP stands fro object oriented programing
  3. Object define as any thing which have some properties and functions
  4. Class have some propertis known as data members
  5. Class have some methods to perform some actions
  6. Class have access specifier know as Public , Private , Protected
  7. Object use to access the class properties and set values or calling the member function of class .
  8. Polymorphism means "many forms" it means that occure when we have classes that are relate to each other by inheritance.

Code


# include<iostream>

using namespace std;


class FirstClass {
public:
int num;



string strn;


public:

MyClass()
{
cout << "Constructors";
}
public:

void myMethod()
{
cout << "Method Call";
}
};

int main()
{
FirstClass myObj;

myObj.num = 15;
myObj.strn = "Some text";

cout << myObj.num << "\n";
cout << myObj.strn;
cout << endl;
myObj.myMethod();
return 0;
}




Output

15
Some text
Method Call




I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back.C++ Classes and C++ object orriented programing and C++ OOP  | C++ Tutorials Bestitworrior