W trakcie pisania mojego kodu natknąłem się na jeden dziwny błąd. W 1 pliku trzymam wszystkie include, nazwijmy go includes.h, w innych plikach trzymam klasy itd np clientclass.h
kod błędu:
/mnt/orange-new/units/includes.h|34|error: ‘ClientClass’ does not name a type|
includes.h
#ifndef INCLUDES_H_INCLUDED
#define INCLUDES_H_INCLUDED
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <errno.h>
#include <sys/timeb.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <time.h>
#include <iostream>
#include <cstring>
#include <string>
#include "config.h"
#include "console.h"
#include "clientclass.h"
#include "tcpparser.h"
#include "netmsg.h"
#include "main.h"
Console Konsola;
ClientClass Clients;
TCPThread ParserTCP;
#endif // INCLUDES_H_INCLUDED
clientclass.h
#ifndef CLIENTCLASS_H_INCLUDED
#define CLIENTCLASS_H_INCLUDED
#include "includes.h"
struct ClientStruct {
int Sock;
int Ident;
int Room;
std::string Name;
std::string IP;
};
class ClientClass {
public:
ClientClass(); // create
int Add();
void Delete(int index);
int Count();
ClientStruct Client[MAX_CLIENTS];
protected:
void Reset(int index);
private:
int _count;
};
#endif // CLIENTCLASS_H_INCLUDED
w czym może być problem? proszę o pomoc.