Function Overloading with Examples in C++ | C++ Tutorials for Beginners #19

preview_player
Показать описание

Best Hindi Videos For Learning Programming:



►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -



►Django Complete Course In Hindi -






Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

At the time of 6:25 to 7:26..💯💯

Golden rule for every new programmers..

JustOne
Автор

I was going to a class and I wanted to make cool programs like you, but the teacher there was not teaching well and when I asked him to continue the class after learning C and C++ from him he said that I should join the class after completing 10th standard. I felt bad and I browsed information on the internet and then I found you on youtube. Now I am proving him wrong by learning C, C++, Python, HTML, CSS and Javascript basics. He said that I can't learn these languages because I am in 14 years old. Now he is proved wrong. Thank you very much Harry Sir!!!!

vaibhavdhaygondexdr.v.sa
Автор

Func overloading take different arguments with same function data type and name. Volume of cube a^3

nibsprogramming
Автор

Harry sir, to avoid the *"tempcoderunner"* error please avoid selecting a part of code and then running it with the play button (OR) check the *Code-runner: Ignore Selection* box in the code runner settings in VS Code to avoid this completely. Love your videos sir.

ucipher
Автор

your way of teaching is out of this world. you make hard concepts look so easy .

ritikabali
Автор

I feel like I’ve grasped the concept really well now! Function overloading allows multiple functions to have the same name but with different parameter lists. This means you can create several versions of a function, each tailored to handle different types or numbers of inputs, making your code more flexible and readable. It’s a powerful feature that helps streamline programming and manage complex tasks efficiently. ♥♥

crtscripts
Автор

2:03 --> yes it will be executed because both the functions are taking different amount of arguments though they have the same name

alnahian
Автор

you make easy concept sooo hardddd thank you for teaching ☺☺

ranbeerkamlapure
Автор

hey harry, these are the mathematical formulae used in the overloaded function volume():-
1) volume of cylinder: pi*(r^2)*h
2) volume of cube : (a^3)
3) volume of cuboid: (l*b*h)

abrarahmad
Автор

2:16 haa Harry bhai dono sum function apne parameters dekhke execute karenge, aur right function choose karenge

yashkhatwani
Автор

function overloading means we can use more than one function of the same name for different aspects.

abuhuraira
Автор

Hi @CodeWithHarry I am finding your tutorials really helpful and I love them. My request to you is can you make a tutorial on strings in c++ as I can't find them in your playlist . It will be really helpful.🙏🙏

deepanshumahto
Автор

The channel name should be Harry Coder..Like Harry Potter...You are a true magician...Hat's off to you and your efforts..Love you

Aaku_
Автор

Hey Harry For Teaching Us
#include<iostream>
using namespace std;

Creating Function's -

int vol(double r, int h){ //Finding Volume Of Cylinder
return(3.14*r*r*h);
}

int vol(int a){ //Finding Volume Of Cube
return(a*a*a);
}

int vol(int l, int b, int h ){ //Finding Volume Of Rectangle
return (l*b*h);
}

int main(){
int x, radius, height, side, length, breath, h; //Declaring Variables
cout<<"Enter 1. - To Find Volume Of Cylinder "<<endl; //Giving Options To user
cout<<"Enter 2. - To Find Volume Of Cube "<<endl;
cout<<"Enter 3. - To Find Volume Of Rectangle "<<endl;
cout<<"Enter Your Choice Here - "<<ends;
cin>>x; cout<<endl;

switch (x)
{
case 1: //To Find Volume Of Cylinder
cout<<"Enter Radius - "; cin>>radius; cout<<endl;
cout<<"Enter Height - "; cin>>height; cout<<endl;
cout<<"Volume Of Your Cylinder is - "<<vol(radius, height)<<endl;
break;

case 2: //To Find Volume Of Cube
cout<<"Enter Side - "; cin>>side; cout<<endl;
cout<<"Volume Of Your Cube is - "<<vol(side)<<endl;
break;

case 3: //To Find Volume Of Rectangle
cout<<"Enter Length - "; cin>>length; cout<<endl;
cout<<"Enter Bredth - "; cin>>breath; cout<<endl;
cout<<"Enter Heigth - "; cin>>h; cout<<endl;
cout<<"Volume Of Your Cylinder is - "<<vol(length, breath, h)<<endl;
break;
default:
cout<<"Are You Kidding : / Enter A Valid Option";
break;
}

return 0;
}

ishaansrivastava
Автор

Bhai thx 😭😭
Aakhir mai samaj aaya
Bhot vdo dekhe the
Ur explaination was awesome 👍👍

.aniketmatkar
Автор

you are legend harry bhai you teach better than my school teacher

nalinisharma
Автор

Volume of cube; side=a, a=a-1, volume =(a+1)^3 ;)

dudewearegood
Автор

// in function overloading if there are more than one function with same name but different type of argument then cpp is smart enough to match argument with proper function and execute it
#include <iostream>
using namespace std;
int area(int l){
return l*l;
}
int area(int a, int b){
return a*b;
}
int area(int a, int b, int h){
return 0.5*(a+b*h);
}
int main() {
cout<<"The area of 4 length square is "<<area(4)<<endl;
cout<<"The area of 3 length and 4 width rectangle is "<<area(3, 4)<<endl;
cout<<"The area of cone is "<<area(2, 4, 5);
}

atifmalik
Автор

Day-13
Tutorial-19
Date-15/12/2022
Time-17:56
Topic-Function Overloading
Thank u harry
❣❣

AnEngineerHuman
Автор

2:00 execute hoga, meri guarantee hai mujhe me java sikhke aaya hun mujhe method overloading or overridin sab pata hai👍👍👍!

fellincode