Skip to content

Commit 9be6dff

Browse files
committed
Update unique-pointers.cpp
1 parent de7c632 commit 9be6dff

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Learn Advancec C++ programming
2+
// Unique Pointers
3+
4+
#include<iostream>
5+
using namespace std;
6+
7+
class Test {
8+
public:
9+
Test() {
10+
cout << "created" << endl;
11+
}
12+
13+
void greet() {
14+
cout << "Hello" << endl;
15+
}
16+
17+
~Test() {
18+
cout << "destroyed" << endl;
19+
}
20+
21+
};
22+
23+
24+
int main() {
25+
26+
cout << "Finished" << endl;
27+
28+
29+
return 0;
30+
}
31+

0 commit comments

Comments
 (0)