Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.41K
~184 People Reached
Favorite Forums
Favorite Tags
Member Avatar for can-mohan

Hi All, I just want to know whether use of shared_ptr is justified in below code here or do i need to use unique_ptr instead of shared_ptr? #include <iostream> #include <memory> using namespace std; class a { int a1 ,b; public: a(int x=0,int y=0):a1(x),b(y){} void fun1() {cout<<a1;cout<<b;} }; class b …

Member Avatar for madhav sai
0
184