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

Author Topic: [SFML2] sf::Socket::Status::Done warning/error  (Read 3311 times)

0 Members and 1 Guest are viewing this topic.

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
[SFML2] sf::Socket::Status::Done warning/error
« on: April 17, 2011, 03:45:57 am »
Code: [Select]
if(socket.Receive(packet,address,port) == sf::Socket::Status::Done)


gives me this warning in visual c++ 2010:

Quote
warning C4482: nonstandard extension used: enum 'sf::Socket::Status' used in qualified name


In linux it actually gives me an error. I would post the error but I dont have access to a linux machine at the moment.

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
[SFML2] sf::Socket::Status::Done warning/error
« Reply #1 on: April 17, 2011, 08:32:15 am »
When I get an error like this I usually included too much on the enum. I believe you want to just use Status::Done or if you haven't using'd sf then sf::Status::Done.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
[SFML2] sf::Socket::Status::Done warning/error
« Reply #2 on: April 17, 2011, 10:01:52 am »
In C++ (until the next standard is released), the name of an enum is not part of the qualification. So it's not sf::Socket::Status::Done but sf::Socket::Done.

You should simply have read the doc and tutorials ;)
Laurent Gomila - SFML developer

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
[SFML2] sf::Socket::Status::Done warning/error
« Reply #3 on: April 17, 2011, 08:17:03 pm »
Oh! Dumb mistake. Funny thing is that I did look at the tutorials. I just completely overlooked the difference. Thats what I get for staying up too late coding XD