dimanche 12 janvier 2020

How to use shared pointer as a function argument

With traditional pointers i can use them in the following way.

int value;

void setValue(int* val)
{
  *val = 5;
}

SetValue(&value);

Can i do the same thing with shared Pointer ?

Aucun commentaire:

Enregistrer un commentaire