Let class R contain an instance to itself, ie. The singleton pattern.
Then you can do:
class A
{
R *resource;
public:
A() { resource = R::getInstance(); }
}
and from then on use 'resource' as a new class pointer, just in case you change your mind how things work later on.
However, what might be better and more flexible is for the parent to grab the instance. For example, in class P:
classA = new A(R::getInstance());
This way you can easily change the resource class if needed (eg. for unit testing), but class P isn't managing the resource object.