If a class has a base class with pure virtual functions, it can't be instantiated unless it implements those functions. CLion creates stubs of the implemented functions, with the default return values for the primitive types, and null values for the objects.
Implement required functions
On the Generate (Alt+Insert), and select Implement functions.menu, click (Ctrl+I). Alternatively, you can right-click anywhere in the class file, then click
Select the functions to implement.
Change function body
The code template used for implementing functions (Implemented function body) accepts predefined template variables from the File Header include template (such as
For example, consider the following file template:
This template expands into the following code: