Note that there are some explanatory texts on larger screens.

plurals
  1. POClientClass does not name a type. GCC Linux
    text
    copied!<p>While making my code, i ran into a strange problem. I hold 1 file for all includes, lets call it includes.h and class files like clientclass.h etc.</p> <p>The problem is, when i try to compile my code i get a compiler error:</p> <blockquote> <p>/mnt/orange-new/units/includes.h|34|error: ‘ClientClass’ does not name a type|</p> </blockquote> <p>includes.h :</p> <pre><code>#ifndef INCLUDES_H_INCLUDED #define INCLUDES_H_INCLUDED #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #include &lt;pthread.h&gt; #include &lt;errno.h&gt; #include &lt;sys/timeb.h&gt; #include &lt;sys/select.h&gt; #include &lt;sys/socket.h&gt; #include &lt;sys/types.h&gt; #include &lt;sys/wait.h&gt; #include &lt;netinet/in.h&gt; #include &lt;fcntl.h&gt; #include &lt;arpa/inet.h&gt; #include &lt;time.h&gt; #include &lt;iostream&gt; #include &lt;cstring&gt; #include &lt;string&gt; #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 </code></pre> <p>clientclass.h :</p> <pre><code>#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 </code></pre> <p>Can you help me with my problem? im out of ideas :(</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload