0
What am i doing here?
... void func(int &x){ x+=1; } int *CheckCondition(void(*tem)(int&)){ int *a = new int; *a = 3; tem(*a); ... CheckCondition(func); ... Can you please tell me what am i passing here: tem(*a) Is it a value to a reference?🤔
1 Réponse
+ 1
You end up passing the heap address that contains the 3 so it can be changed to 4.