Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Error C2679

Error C2679

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esepich
    wrote on last edited by
    #1

    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

    K S 2 Replies Last reply
    0
    • E esepich

      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

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      The compiler is telling you that, there is a type mismatch. The "sin_addr" is a structure. Read the MSDN about it. (In my humble opinion: you got to dig deeper in programming:suss::-) ) Try this @ home. (B&B)

      1 Reply Last reply
      0
      • E esepich

        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

        S Offline
        S Offline
        Steve Mayfield
        wrote on last edited by
        #3

        Try this: tempaddr.sin_addr.s_addr = INADDR_ANY; In your example, you are trying to assign a single value to a structure. Steve

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups