8000 Function Overloading revision · DhirajGadekar/Cpp_programming@253ab20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 253ab20

Browse files
committed
Function Overloading revision
1 parent 02bee65 commit 253ab20

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include<iostream>
2+
3+
class Demo {
4+
5+
public:
6+
void fun() {
7+
8+
std::cout << "No Parameter Fun" << std::endl;
9+
}
10+
void fun(int x) {
11+
12+
std:: cout << "Para Fun" << std::endl;
13+
}
14+
};
15+
16+
int main() {
17+
18+
Demo obj;
19+
20+
obj.fun();
21+
obj.fun(10);
22+
}

0 commit comments

Comments
 (0)
0