Question: HI, is it possible to make a function that receive as parameter a share pointer. Could you helps me like vector(ObjectX) myFunctionName ( sharePTR ptr1

HI,

is it possible to make a function that receive as parameter a share pointer. Could you helps me

like

vector(ObjectX) myFunctionName (sharePTR ptr1)

[

Vector1.pushpack(sharePTR);

return vectorObjectX

]

main:

ptr = makeshared(ObjectX)(int blabla, string blabla2 ...)

result that I want

----------------------------

line0 sharePTR ptr1

----------------------------

1 sharePTR ptr1

----------------------------

2 sharePTR ptr1

----------------------------

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!