Skip to content

SejalCh/Constructor-Overloading-in-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Constructor-Overloading-in-CPP

##AIM:To study about constructor overloading in C++

##THEORY:

In C++, two constructors can have the same name if the number and/or type of arguments passed is different.These constructors having the same name but different arguments are known as overloaded constructors.Overloaded constructors have the same name (name of the class) but the different number of arguments. Depending upon the number and type of arguments passed, the corresponding constructor is called.


Syntax public class varname{
varname(){
....}
varname(string s){
....}
varname(int i){
....}
...
}

three overloaded constructors ;they must have different parameters list

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages