0

So, I have 2 classes, one is Users, and the other one is ImageBook ImageBook has a map of Users and some methods. It's header goes like this:

// some includes
using namespace std;

class ImageBook {
private:
    map<string, Usuario> users;
public:
    // some methods
    Etiqueta& buscarEtiqueta(const string& _etiqueta);
};

Then, my header in the Users class goes like this:

// some includes
using namespace std;

class Usuario {
private:
    string email;
public:
//some methods

I want to use the method in the ImageBook class, the first one called buscarEtiqueta, inside the .cpp of my Users class, how can I achieve this circular inclusion? I heard something about including the header of ImageBook inside the header of Users, but I don´t know anything more.

0 Answers0