VIDEO
in this video we will discuss how to Constructor in C++ | OOP in C++ -
' Constructor '
A constructor in C++ is a special method that is automatically called when an object of a class is created.
- Class name and method name is same
- No return type
#include <iostream>
using namespace std;
class student{
private:
int a=20;
public:
student(){
cout<<"This is Constructor !"<<endl;
}
void display(){
cout<<"Values is :"<<a;
}
};
int main(){
student obj; //calling constructor
obj.display(); // calling method
}
► Shopify For Beginners :- https://youtube.com/playlist?list=PLm...
► Google AdSense :- https://www.google.com/adsense/start/
► Google Cloud Boost Playlist - https://www.youtube.com/playlist?list...
► Google Cloud SQL Playlist:- https://youtube.com/playlist?list=PLm...
► GitHub Playlist - https://youtube.com/playlist?list=PLm...
► Flutter For Beginners :- https://youtube.com/playlist?list=PLm...
► WordPress Free themes For Beginners :- https://youtube.com/playlist?list=PLm...
► HTML & CSS and JAVASCRIPT Projects:- https://youtube.com/playlist?list=PLm...
► C++ For Beginners Playlist :- https://youtube.com/playlist?list=PLm...
► OOP in C++ : https://youtube.com/playlist?list=PLm9Gsf8MIeRfQItd4qclHckYmsnu3gzo7
► C++ Basic Programs : https://youtube.com/playlist?list=PLm...
► SQL Tutorials For Beginners: https://youtube.com/playlist?list=PLm...
🔁 Facebook: https://www.facebook.com/mscubetechco...
🛑 YouTube : https://www.youtube.com/channel/UC1Gb...
#html #css #c++ #cpp #mscubetech #coding #programming #javascript #mscubetech
0 Comments
Thanks for Supporting me