Error C2679
-
SOCKADDR_IN tempaddr; tempaddr.sin_addr = INADDR_ANY; I have seen code like this in many examples. I am not quite sure why the compiler would tell me that: error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'unsigned long' (or there is no acceptable conversion) I would have never gotten as far as I did with this program without all of your help. Thank you
-
SOCKADDR_IN tempaddr; tempaddr.sin_addr = INADDR_ANY; I have seen code like this in many examples. I am not quite sure why the compiler would tell me that: error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'unsigned long' (or there is no acceptable conversion) I would have never gotten as far as I did with this program without all of your help. Thank you
-
SOCKADDR_IN tempaddr; tempaddr.sin_addr = INADDR_ANY; I have seen code like this in many examples. I am not quite sure why the compiler would tell me that: error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'unsigned long' (or there is no acceptable conversion) I would have never gotten as far as I did with this program without all of your help. Thank you
Try this:
tempaddr.sin_addr.s_addr = INADDR_ANY;
In your example, you are trying to assign a single value to a structure. Steve