Results 1 to 4 of 4

Thread: Help with error during compile..

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    Help with error during compile..

    I keep getting the following error in VC++:

    error C2102: '&' requires l-value

    The line of code it's referring to is this:

    ptTmp = MAKEPOINTS((POINTS FAR *) lParam);

    Any help would be appreciated..

    Dan

    Visual Studio 2010

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    remove the (POINTS FAR*) cast.
    MAKEPOINTS expects an LPARAM

    btw, FAR is not necessary anymore. The 32-bit time is here!
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Well why the heck would Microsoft still be showing that code then if it's obsolete? That is straight from their MSDN site...

    Visual Studio 2010

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    In the windows headers you'll find this line
    #define FAR
    which simply says: whenever you encounter FAR, remove it.

    They left it for easier transition from Win3.x to 95/NT
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width