G
George Styles
Hi,
I have a base object, CBase, and 2 sub-objects CSub1 and CSub2.
Given that I have a pointer to CBase, can I find out (easily in a portable
way) if the object is CSub1 or CSub2. (or neither, but in my app its always
1 or the other)
In Delphi, you would use the IS operation, eg
if myObject IS CSub1 then
.....
Can someone tell me the C++ equivelent please?
thanks
George
I have a base object, CBase, and 2 sub-objects CSub1 and CSub2.
Given that I have a pointer to CBase, can I find out (easily in a portable
way) if the object is CSub1 or CSub2. (or neither, but in my app its always
1 or the other)
In Delphi, you would use the IS operation, eg
if myObject IS CSub1 then
.....
Can someone tell me the C++ equivelent please?
thanks
George