Yes, you can.
You can access the public members of the object via the
->
operator, of course.
I can't know why are you getting runtime failures, however I might suspect you are calling methods (or accessing data) of an invalid pointer (e.g. is the passed object still alive - has not be released - while you are accessing it?).
[Update]
#include <iostream>
using namespace std;
class X
{
public:
int ver;
X(int v):ver(v){}
};
class Y
{
X * px;
public:
Y(X * pObj):px(pObj){}
void showXVer(){ cout << "x version: " << px->ver << endl;}
};
int main()
{
X x(42);
Y y(&x);
y.showXVer();
}
[/Update]