I am reading through my c++ about proper use of pointers but the specific problem I am having here does not seem to appear in there. (That or I am overlooking something). The mostly talk about
I have a function in a class that is using a pointer like so:
Code:
if (ptr->group == SomeIntegerValue)
The function gets *ptr passed as a parameter from something else which I do not entirely understand yet. Therefore I plan to get around that by having another pointer(from another function in the same class) that accesses SomeIntegerValue like this.
And what would be the correct syntax to do so?
Yes, they can. But that would be rather bad code to do do so.
I am working with a modding SDK for a large game engine and pointers fishing out things all over the place appears to be very common so I would like to learn how to do it properly.