I have a Client and a Player class
class Client {
// socket & networking info...
sf::UdpSocket socket;
};
class Player : public Client {
//Player info...
};
Then I make a player object and try and push it into a std::vector...
void addPlayer(Player p) {
vector.push_back(p);
}
Are sf::sockets not able to be copied by default, or am I doing something wrong?
I was thinking that becuase of this...
SFML/Network/Socket.hpp:45:24: note: ‘sf::Socket::Socket(const sf::Socket&)’ is implicitly deleted because the default definition would be ill-formed: class SFML_NETWORK_API Socket : NonCopyable
^
neither of my classes have any variables that would prevent them from becoming NonCopyable.
I could fix this by changing the vector from objects to pointers, but that's against my design.
Please help, thanks