Group: comp.lang.c++
From: Rob
Date: Sunday, April 13, 2008 1:16 PM
Subject: How would I do this dynamic_cast?

[CODE]
(I am not the one who defined these classes)

class _jobject {};
class _jarray : public _jobject {};

typedef _jobject* jobject;
typedef _jarray jarray;

int main()
{
jobject * a;
jarray b;
a = dynamic_cast (&b);
....
}
[/CODE]

This doesn't work and the problem is the only type names I'm
guaranteed to have are jobject and jarray. The original _jobject is
how it's defined here but I'm not guaranteed it''ll always be that way
so I have to work with jobject/jarray.

How would I cast between jobject and jarray?

Safety Articles | Usenet Groups | Usenet News | Bluegrass