For structs in C++, we have it like

    1. struct iStruct {
    2. int age;
    3. }

    If we have an instance iStruct Sam When accessing element, we can

    1. Sam.age = 1; //directly access

    or if we have pointer iStruct *Sam, we can access by

    1. (*Sam).age = 1;
    2. Sam->age = 1;

    Regarding to Class. say

    1. class A{
    2. public:
    3. play();
    4. }

    if definition is A *p : use p->play()
    if definition is A p : use p.play()