Xref: utzoo gnu.g++.help:498 comp.lang.c++:11831 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!unreplyable!garbage From: tilo@nmr.lpc.ethz.ch (Tilo Levante) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: compare types Message-ID: <9102140811.AA16812@purcell.ethz.ch> Date: 14 Feb 91 08:11:46 GMT Sender: daemon@tut.cis.ohio-state.edu Followup-To: gnu.g++.help Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu Lines: 28 assume the following classes: class base; class d1: public base; class d2: public base; base *v1; d1 *v2; v1 = new d1; Is there a way to decide during runtime, wether v1 points to a variable of type d1 or of type d2. Or is there a way to decide wether v2 = (d1*) v1; is valid. Thanks for any help. Tilo ******************************************************************************* * Tilo Levante Domain: tilo@nmr.lpc.ethz.ch * * Institut fuer physikalische Chemie UUCP: ...!mcsun!chx400!ethz!tilo * * Eidgenoessische Technische Hochschule * * ETH-Zentrum Phone: +41/1/256-4372 * * CH-8092 Zuerich Fax: +41/1/252-3402 * *******************************************************************************