Skip to content

Commit 6d86296

Browse files
authored
Merge pull request #48 from NishkarshRaj/cpp
Hello World Code in Cpp | Object Oriented
2 parents 16c35d2 + ab9fcc4 commit 6d86296

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Cpp Programming/OO.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include<iostream>
2+
using namespace std;
3+
//Object Oriented Hello World Code in C++
4+
class Hello
5+
{
6+
public:
7+
void show()
8+
{
9+
cout<<"Hello World";
10+
}
11+
};
12+
//Main Code
13+
int main()
14+
{
15+
Hello *h1 = new Hello;
16+
h1->show();
17+
}

0 commit comments

Comments
 (0)