Pointer not working

When ever I try to compile the code below I get this error:

"error C2102: '&' requires l-value"

ICI is a pointer to an unmanaged class, this is being done with in a managed class. X is a double pointer, where as XPostion_Meters is just a double.

ICI->ICOList[Count].X = &IPObs[Count]->IPObj->XPostion_Meters;

Any help would be appreciated



Answer this question

Pointer not working

  • Marcelo Ferrer

    Can you please explain the meaning of a "unmanaged managed class"

  • aaks

    Are you positive that the error you are getting is actually from that line of code And if so, what's the definition of XPostion_Meters

  • MarkPierce

    Yes, when I comment it out there are no problems.

    the definition:

    public interface class IPObject

    {

    //stuff

    virtual property double XPostion_Meters {double get(); void set(double value);}

    };

     

    ok after looking at the definition I realize that the problem is that it is a property... but is there a way to do what I am trying to do


  • Bruce Bukovics

    sorry typo, I corrected
  • VOC

    NeederOfVBHelp wrote:

    ok after looking at the definition I realize that the problem is that it is a property... but is there a way to do what I am trying to do

    Short answer: no. You can't bind a double pointer to a property. Consider redesigning the application, so that you don't need this pointer.



  • Pointer not working