I may be too stupid for this, but I can't really get my head around this:
I have files Header.h, Header.cpp, Quadtree.h and Quadtree.cpp.
Header.h
#pragma once
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "Quadtree.h" <------------------------------ CAUSES ERRORS, without it working fine
class Person
{
protected:
...
public:
...
virtual void update(Quadtree quadtree); //<---- I NEED THE ABOVE INCLUDE FOR THIS ARG
};
Quadtree.h
#ifndef __QUADTREE_H__
#define __QUADTREE_H__
#include "Header.h"
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/Text.hpp>
class Quadtree {
public:
Quadtree(float x, float y, float width, float height, int level, int maxLevel);
private:
...
I need to pass a Quadtree instance to update function in Person. So what I tried was adding the include Quadtree.h, but that gives me loads of errors and I don't know how to fix it. I have the header guards in Header.h and Quadtree.h.. so
what is the problem?
Here are the errors, I don't expect you to find something in these, I am just posting this to show how many bullshit error comes up by only adding one include in Header.h