#include <functional>
using namespace std;
void Test(shared_ptr<vector<int>> v)
{
vector<int> & r_v = *(v.get());
cout << r_v[1];
}
int main()
{
shared_ptr<vector<int>> a = make_shared<vector<int>>(std::vector<int>{ 1, 2, 3 });
Test(a);
getchar();
return 0;
}
No comments:
Post a Comment