[petsc-users] question about contexts

Jed Brown jedbrown at mcs.anl.gov
Fri Sep 30 13:09:45 CDT 2011


On Fri, Sep 30, 2011 at 12:28, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> > But the method is like a "friend" in the sense that it can access members
> through an explicit pointer.
>
> Can you please expand a bit on this one? What is an explicit pointer?


Cast the void* to a MyClass*, then access all the members through that
pointer. It will look like a normal member function except that there is no
implicit "this", you have to explicitly use the MyClass* to access
non-static members.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110930/d2013ea8/attachment.htm>


More information about the petsc-users mailing list