Exercise: PImpl Idiom
Test your understanding of the PImpl idiom.
We'll cover the following
Problem statement
You’re given a PublicClass
interface and a PImplClass
. Your task is to define an opaque pointer in the PublicClass
that will point to its PImplClass
implementation class. You need to ensure that when the code in the following widget runs, it shows the following messages on the screen:
PublicClass::publicMethod
PublicClass::privateMethod
Coding challenge
Refer to this hint if you get stumped while solving this challenge.
Get hands-on with 1200+ tech skills courses.