On 04/25/2012 07:50 AM, Nick Sabalausky wrote:
The compiler rejects this:
class Base {}
class Derived : Base {}
void main()
{
Base*basePtr;
Derived* derivedPtr;
basePtr = derivedPtr; // ERROR
}
Is that really correct that it shouldn't be
On Wednesday, April 25, 2012 01:50:51 Nick Sabalausky wrote:
> The compiler rejects this:
>
> class Base {}
> class Derived : Base {}
>
> void main()
> {
> Base*basePtr;
> Derived* derivedPtr;
>
> basePtr = derivedPtr; // ERROR
> }
>
> Is that rea
The compiler rejects this:
class Base {}
class Derived : Base {}
void main()
{
Base*basePtr;
Derived* derivedPtr;
basePtr = derivedPtr; // ERROR
}
Is that really correct that it shouldn't be allowed?