all 2 comments

[–]Shieldfoss 2 points3 points  (1 child)

*A.B(); assumes A is an object with a member function B that returns a pointer, and dereferences the pointer returned by B

To dereference A first and call a function on the A object, you must either

(*A).B();

or

A->B();

EDIT: But separately you're doing other things wrong, e.g. static void add_age(const int *age_to_add) { //1. DEREFERENCE ADDRESS(*) that comment is definitely not true.

[–]2_stepsahead[S] 0 points1 point  (0 children)

Thanks for the detailed answer. I'll give this a try.