Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Introduction To CPP

This document discusses key concepts in C++ including declaring and defining member functions outside a class, copy constructors, overloading constructors, operator overloading, and inheritance. It provides an example of declaring a perimeter() member function in the Rectangle class and defining it outside the class. Copy constructors and constructor overloading are also mentioned as topics covered.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Introduction To CPP

This document discusses key concepts in C++ including declaring and defining member functions outside a class, copy constructors, overloading constructors, operator overloading, and inheritance. It provides an example of declaring a perimeter() member function in the Rectangle class and defining it outside the class. Copy constructors and constructor overloading are also mentioned as topics covered.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

C++ Lab

Class in C++ Language

Declaring Member function and


Defining it outside of the class
class Rectangle
{
public:
int length, breadth;
void area() {
cout<<Area : << (length*breadth)<<endl;
}
void perimeter();
};
void Rectange:: perimeter()
{
cout<<Perimeter : <<(2*(length+breadth))<<endl;
}

Copy Constructor

Overloading
Constructors

Copy Constructor

Operator Overloading

Inheritance

You might also like