Quick Answer

Forward-declared but undefined base classes

Understanding the Issue

This error occurs when a class tries to inherit from another class that has been declared but not fully defined (only forward-declared).

The Problem

This code demonstrates the issue:

Cpp Error
// Problem: Forward-declared base
class Base; // Incomplete
class Derived : public Base {}; // Error

The Solution

Here's the corrected code:

Cpp Fixed
// Solution: Include full definition
#include "Base.h"
class Derived : public Base {}; // OK

Key Takeaways

Always include full class definitions for base classes.