add forward declaration examples

add class & inheritance examples
This commit is contained in:
2025-03-19 12:31:23 +01:00
parent f10623163b
commit 4a753b0b8d
17 changed files with 665 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include "Entity.h"
#include "ICompareable.h"
class Monster : public Entity, public ICompareable
{
public:
Monster(int strength);
virtual void Move() = 0; // abstract (pure virtual method)
std::string ToString() override;
int Compare(ICompareable* other) override;
protected:
int _strength = 0;
};