我不明白为什么我得到这个编译错误:
Run Code Online (Sandbox Code Playgroud)error C2027: use of undefined type 'GameState' note: see declaration of 'GameState' error C2338: can't delete an incomplete type warning C4150: deletion of pointer to incomplete type 'GameState'; no destructor called
这是相关代码:
#pragma once
#include <SFML\Graphics.hpp>
#include "SpawnManager.h"
#include "Resource.h"
#include <stack>
#include <memory>
class GameState;
class Controller
{
public:
Controller();
void run();
void setPlayerScore(unsigned score);
sf::RenderWindow& getWindow() { return m_window; }
void addState(const States& state);
void changeState(const States& state);
GameState* getState() const;
void popState();
void add_state(const States& type, …Run Code Online (Sandbox Code Playgroud)