error: CLASS_NAME has not been declared/does not name a type (c++)
<p>I don't know why I'm getting this error, because it compiled perfectly just an hour ago and I haven't made any change here.</p>

<p>I have a class called SocketsStatus, and then I have many threads which implement a socket connection each one. So I'm passing a reference to a SocketsStatus object to control which ones are connected and which ones not.</p>

<p>Header of SocketsStatus:</p>

<pre><code>#ifndef SOCKETSSTATUS_H_
#define SOCKETSSTATUS_H_

#include &lt;QMutex&gt;
#include &lt;BufferDatos.h&gt;

class SocketsStatus {
public:
    SocketsStatus();
    int setBufferStatus(int bufferId, bool status);
    bool isEveryBufferDisconnected();
    virtual ~SocketsStatus();

private:
    void init();

    bool bufferRawMeasConnected;
    bool bufferPosConnected;
    bool bufferRtkConnected;
    QMutex *mutex;
};

#endif /* SOCKETSSTATUS_H_ */
</code></pre>

<p>Then, beginning of header of BufferDatos, which is my Thread class:</p>

<pre><code>#ifndef BUFFERDATOS_H_
#define BUFFERDATOS_H_

#include &lt;QThread&gt;
#include &lt;QTcpSocket&gt;
#include &lt;SocketsStatus.h&gt;
#include "Global.h"

class BufferDatos: public QThread {
public:
    BufferDatos(QString ip, qint16 port, SocketsStatus &amp;buffersStatusPassed);
    virtual QByteArray extraerSiguienteMensaje(void) = 0;
    virtual ~BufferDatos();

protected:
    void run(void);
    bool connect(void);
    void receiveData(void);
    bool reconnect(int &amp;timeoutsWithOpenSocket);

protected:
    QTcpSocket *tcpSocket;
    QString ip;
    qint16 port;
    SocketsStatus &amp;buffersStatus;
//...
</code></pre>

<p>I'm getting <strong>error: ‘SocketsStatus’ has not been declared</strong> at the ctr, and then when declaring the variable as protected I also get <strong>error: ‘SocketsStatus’ does not name a type</strong>. </p>

<p>Must be some stupid detail, but I don't happen to see where! Any help?</p>
