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

Author Topic: Problem with sf::UdpSocket  (Read 1778 times)

0 Members and 1 Guest are viewing this topic.

Wissam

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Problem with sf::UdpSocket
« on: July 17, 2014, 12:52:24 am »
So this error keeps raising up after hours of trying to find whats wrong..
Quote
Error   1   error C2248: 'sf::NonCopyable::operator =' : cannot access private member declared in class 'sf::NonCopyable'

I've narrowed down to where the problem occurs through the process of guess and check(keep in mind im using MSV13 if that makes a difference)

Quote
server::server(sf::UdpSocket surver, sf::IpAddress ip,
   int por, std::string stats){
   serverIP = ip;
   port = por;
   status = stats;
   serverSLSocket = surver;

specifically here:
Quote
serverSLSocket = surver;

Much help is appreciated!

Strelok

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • GitHub
Re: Problem with sf::UdpSocket
« Reply #1 on: July 17, 2014, 03:31:43 am »
Socket inherits NonCopyable. That means you can't use the assignment operator and the copy constructor. https://github.com/SFML/SFML/blob/master/include/SFML/System/NonCopyable.hpp
« Last Edit: July 17, 2014, 03:34:55 am by Strelok »

 

anything