Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - XeRaCKeR

Pages: 1 [2]
16
Ok, I am on SFML 2.0 now.

And now I get this error:
error: no matching function for call to 'sf::Thread::Thread()'|
note: candidates are: sf::Thread::Thread(const sf::Thread&)|

I can't declare sf::Thread without the constructor, and I can't construct on my class Client... how I should do it?

17
Yes, I readed it and I know how to create a Thread and launch it. I can use Thread with a function; and I can use Thread as class... but now, I wish use Thread with fuction on my class Client. Is it possible?

In brief, I need a class with 2 differentes threads, but when I declare sf::Thread on a class, I get:
Thread.hpp|92|error: 'sf::Thread::Thread()' is protected|

18
Hi, I'm working on a Client App and I wish to create a Client class where I create 2 threads (R and S), who execute functions Receiver and Sender, respectively...
class Client {
    sf::IPAddress ServerAddress;
    sf::SocketTCP Socket;
    sf::Packet Packet;
    sf::Thread R, S;
    void Receiver(void*);
    void Sender(void*);
    bool connected;
    bool updated;
public:
    Client();
    sf::Packet Receive();
    void Send(sf::Packet);
    bool IsConnected();
    bool IsUpToDate();
};
 

Then, I get:
Thread.hpp|92|error: 'sf::Thread::Thread()' is protected|

I tried with
class Client : public sf::Thread {
and
class Client : private sf::Thread {
but this doesn't resolve it

How can I resolve it?

PD: Sorry if bad english ^^

Pages: 1 [2]