OOP demonstration in C++17 using a Pokémon
It looks like all the Pokemon member variables should be private, not public.
The Pokemon constructor takes catch_rate as an int, where it should be a float.
The Pokemon constructor could std::move the string argument into m_type.
Pokemon::type() could return by const&amp; to avoid an unnecessary copy.
Castform::m_forms is not used anywhere, but should probably also be static and const.
When overriding a virtual function, we should always use the override keyword (and arguably also the virtual keyword):

virtual bool attempt_catch() override { ... }

Use the C++11 &lt;random&gt; functionality, not rand().




Run-time polymorphism with virtual functions in C++ is driven by a need to treat objects of different types with the same interface. Unfortunately, this example lacks the motivation for it:


Currently the attempt_catch() function could be implemented in the Pokemon base-class with no problem.
There is no example of differing behavior (i.e. there should be a second pokemon type implementing a different attempt_catch() function). Maybe an attack function would work better?
There is no demonstration of using the different types through the same interface. In C++ this usually boils down to storing different types in the same container (e.g. iterating a std::vector&lt;std::unique_ptr&lt;Pokemon&gt;&gt; and calling the virtual function). However, it might be simpler to pass two different pokemon types to a function taking a Pokemon reference:

void throw_pokeball(Pokemon const&amp; target) { target.attempt_catch() } // or something





Depending on what this is actually for, I'd suggest approaching things in a "problem -&gt; solution" way, both in terms of what the code does (see above), but also in terms of language development and why these features exist. i.e.


"Here's what programmers used to have to do without this language feature [...]. It sucks because [...]"
"This language feature allows us to do [...] safely and easily because [...]".




Note that there are many different types of both static and dynamic polymorphism in C++ (e.g. function overloading, implicit conversions, function objects, template parameters (traits, tags, etc.)), not just inheritance and virtual functions.