I would appreciate some input if you don't mind. Can someone please explain to me why converting a base class pointer to a derived class pointer is considered dangerous by the compiler.

>Can someone please explain to me why converting a base class pointer to a
>derived class pointer is considered dangerous by the compiler.
It's not "dangerous" as you say, but it does go against the rules of implicit conversions, so conversion without a cast is illegal, and most of the time such a conversion represents a design flaw, so downcasting is discouraged.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.