Foo^ foo = dynamic_cast(bar); Foo* foo = dynamic_cast(bar); x = a^b;