SlideShare a Scribd company logo
#include<iostream> 
using namespace std; 
class waqar{ 
//i make class name of waqar 
//& again the same name i make a function this is called constructor 
public: 
// i only declare this in class not define how we can define this in main let see 
waqar(); 
}; 
// we can define this in main body or upper to main body both will work same 
// to call function of class you want to declare that function return type (int or void) 
// class name , ORS "::" and than function name 
waqar::waqar(){ 
//here you can write any thing which you want Like 
// i am waqar hussain 
cout<<"I am waqar hussainn"; 
//when program run thid will automatic run 
} 
main() 
{ 
// if you can use VB.Net or C# etc you about constructor that what is this 
//in high languge we use this during loading form
//calling of constructor in maain body 
// when we call function of class we create object and than through object we cal 
// here in constructor when we create object than constructor will automatically cal let see 
// calling of class : we write the name of class & than we create a value for this 
waqar a; 
//waqar a; is call the class and create object for this which is a through a i call different functon 
of the class 
}

More Related Content

What's hot

casperjs presentation
 casperjs presentation casperjs presentation
casperjs presentation
AnsviaLab
 
Découplez votre appli en micro-APIs
Découplez votre appli en micro-APIsDécouplez votre appli en micro-APIs
Découplez votre appli en micro-APIs
Nicolas Blanco
 

What's hot (20)

CoffeeScript - An Introduction
CoffeeScript - An IntroductionCoffeeScript - An Introduction
CoffeeScript - An Introduction
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Loadrunner
LoadrunnerLoadrunner
Loadrunner
 
casperjs presentation
 casperjs presentation casperjs presentation
casperjs presentation
 
Mongo
MongoMongo
Mongo
 
JavaScript OOP Pattern
JavaScript OOP PatternJavaScript OOP Pattern
JavaScript OOP Pattern
 
TsWorkflow
TsWorkflowTsWorkflow
TsWorkflow
 
Découplez votre appli en micro-APIs
Découplez votre appli en micro-APIsDécouplez votre appli en micro-APIs
Découplez votre appli en micro-APIs
 
Mule esb db_2
Mule esb db_2Mule esb db_2
Mule esb db_2
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
 
Mule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converterMule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converter
 
Mule esb db_1
Mule esb db_1Mule esb db_1
Mule esb db_1
 
"this" in JavaScript
"this" in JavaScript"this" in JavaScript
"this" in JavaScript
 
this is simple
this is simplethis is simple
this is simple
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
 
Coffee script
Coffee scriptCoffee script
Coffee script
 
Avoiding Callback Hell From JavaScript
Avoiding Callback Hell From JavaScriptAvoiding Callback Hell From JavaScript
Avoiding Callback Hell From JavaScript
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,How
 

Viewers also liked

Donna Honeymoon Options
Donna Honeymoon OptionsDonna Honeymoon Options
Donna Honeymoon Options
chglat
 
Duel textual anaylsis
Duel   textual anaylsisDuel   textual anaylsis
Duel textual anaylsis
MSavva1
 
Hd insight essentials quick view
Hd insight essentials quick viewHd insight essentials quick view
Hd insight essentials quick view
Rajesh Nadipalli
 

Viewers also liked (18)

Marketing Strategies with 3-D Content Mapping
Marketing Strategies with 3-D Content MappingMarketing Strategies with 3-D Content Mapping
Marketing Strategies with 3-D Content Mapping
 
Google Plus is changing SEO Strategy
Google Plus is changing SEO StrategyGoogle Plus is changing SEO Strategy
Google Plus is changing SEO Strategy
 
UNMH Health Source December 2011
UNMH Health Source December 2011UNMH Health Source December 2011
UNMH Health Source December 2011
 
Elevating a Portfolio
Elevating a PortfolioElevating a Portfolio
Elevating a Portfolio
 
Lone Star Conference Basketball Release
Lone Star Conference Basketball ReleaseLone Star Conference Basketball Release
Lone Star Conference Basketball Release
 
Xhotels slides show
Xhotels slides showXhotels slides show
Xhotels slides show
 
Donna Honeymoon Options
Donna Honeymoon OptionsDonna Honeymoon Options
Donna Honeymoon Options
 
Epic research malaysia daily klse report for 6th august 2015
Epic research malaysia   daily klse report for 6th august 2015Epic research malaysia   daily klse report for 6th august 2015
Epic research malaysia daily klse report for 6th august 2015
 
A brief story of designing kudo
A brief story of designing kudoA brief story of designing kudo
A brief story of designing kudo
 
British Council #Ecologyofwaters
British Council #EcologyofwatersBritish Council #Ecologyofwaters
British Council #Ecologyofwaters
 
Duel textual anaylsis
Duel   textual anaylsisDuel   textual anaylsis
Duel textual anaylsis
 
Education workshop slides
Education workshop slidesEducation workshop slides
Education workshop slides
 
How Best To Care For Your Skin
How Best To Care For Your SkinHow Best To Care For Your Skin
How Best To Care For Your Skin
 
Hd insight essentials quick view
Hd insight essentials quick viewHd insight essentials quick view
Hd insight essentials quick view
 
basic chemistery
basic chemisterybasic chemistery
basic chemistery
 
Rwanda Article
Rwanda ArticleRwanda Article
Rwanda Article
 
Reading Newspapers and Keeping a Collage Journal: Increasing Vocabulary throu...
Reading Newspapers and Keeping a Collage Journal: Increasing Vocabulary throu...Reading Newspapers and Keeping a Collage Journal: Increasing Vocabulary throu...
Reading Newspapers and Keeping a Collage Journal: Increasing Vocabulary throu...
 
C2 cn practices_peterborough zero waste
C2 cn practices_peterborough zero wasteC2 cn practices_peterborough zero waste
C2 cn practices_peterborough zero waste
 

Similar to Constructor in detail

Inheritance.ppt
Inheritance.pptInheritance.ppt
Inheritance.ppt
JP2B1197685ARamSaiPM
 
Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
Wildan Maulana
 
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptxINHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
DeepasCSE
 

Similar to Constructor in detail (20)

Inheritance.ppt
Inheritance.pptInheritance.ppt
Inheritance.ppt
 
Claas waqar
Claas waqarClaas waqar
Claas waqar
 
Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
 
Namespace--defining same identifiers again
Namespace--defining same identifiers againNamespace--defining same identifiers again
Namespace--defining same identifiers again
 
Inheritance
InheritanceInheritance
Inheritance
 
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptxINHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
INHERITANCE, POINTERS, VIRTUAL FUNCTIONS, POLYMORPHISM.pptx
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
Introduction to kotlin and OOP in Kotlin
Introduction to kotlin and OOP in KotlinIntroduction to kotlin and OOP in Kotlin
Introduction to kotlin and OOP in Kotlin
 
Inheritance in c++ by Manan Pasricha
Inheritance in c++ by Manan PasrichaInheritance in c++ by Manan Pasricha
Inheritance in c++ by Manan Pasricha
 
Oop Extract
Oop ExtractOop Extract
Oop Extract
 
Abstract Base Class and Polymorphism in C++
Abstract Base Class and Polymorphism in C++Abstract Base Class and Polymorphism in C++
Abstract Base Class and Polymorphism in C++
 
DrupalCon jQuery
DrupalCon jQueryDrupalCon jQuery
DrupalCon jQuery
 
Bologna Developer Zone - About Kotlin
Bologna Developer Zone - About KotlinBologna Developer Zone - About Kotlin
Bologna Developer Zone - About Kotlin
 
Java: Inheritance
Java: InheritanceJava: Inheritance
Java: Inheritance
 
Lecture 4.2 c++(comlete reference book)
Lecture 4.2 c++(comlete reference book)Lecture 4.2 c++(comlete reference book)
Lecture 4.2 c++(comlete reference book)
 
02-OOP with Java.ppt
02-OOP with Java.ppt02-OOP with Java.ppt
02-OOP with Java.ppt
 
OOP and C++Classes
OOP and C++ClassesOOP and C++Classes
OOP and C++Classes
 
Java concurrency model - The Future Task
Java concurrency model - The Future TaskJava concurrency model - The Future Task
Java concurrency model - The Future Task
 
4th june
4th june4th june
4th june
 
Lecture6.ppt
Lecture6.pptLecture6.ppt
Lecture6.ppt
 

More from HSS-Software House (8)

Whole c++
Whole c++Whole c++
Whole c++
 
Class & sub class
Class & sub classClass & sub class
Class & sub class
 
Inhertance
InhertanceInhertance
Inhertance
 
Parent & child
Parent & childParent & child
Parent & child
 
Class with function & objects
Class with function & objectsClass with function & objects
Class with function & objects
 
C++
C++C++
C++
 
Constructor
ConstructorConstructor
Constructor
 
Class
ClassClass
Class
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 

Constructor in detail

  • 1. #include<iostream> using namespace std; class waqar{ //i make class name of waqar //& again the same name i make a function this is called constructor public: // i only declare this in class not define how we can define this in main let see waqar(); }; // we can define this in main body or upper to main body both will work same // to call function of class you want to declare that function return type (int or void) // class name , ORS "::" and than function name waqar::waqar(){ //here you can write any thing which you want Like // i am waqar hussain cout<<"I am waqar hussainn"; //when program run thid will automatic run } main() { // if you can use VB.Net or C# etc you about constructor that what is this //in high languge we use this during loading form
  • 2. //calling of constructor in maain body // when we call function of class we create object and than through object we cal // here in constructor when we create object than constructor will automatically cal let see // calling of class : we write the name of class & than we create a value for this waqar a; //waqar a; is call the class and create object for this which is a through a i call different functon of the class }