Hello,

I am trying to find out what the existing method of determining whether or not something (function for example) can access a field of a structure. For example:

class A {
  public:
    int pub_var;

    void foo(/*implicit this* */) {...}

  private:
    int private_var;
};

void bar(A a) {...}

In this example, foo can obviously access private_var but bar cannot. When examining function arguments, what is the accepted practice for finding out what members the function may access in the structure.

Thanks in advance,
Mike Tegtmeyer

Reply via email to