2

I can't understand this error, really. Please help me with it. The code is :

m_pIServer = new IDeviceServer(this);

and declarations is :

class IDeviceServer : public IOPCServer
{
  public:
    IDeviceServer( LPUNKNOWN );
  ...

IDeviceServer       *m_pIServer;

What means : a value of type "IDeviceServer *" cannot be assigned to an entity of type "IDeviceServer *" ? I can't understand it.

2
  • I'm going to suspect the root cause of the error is somewhat related to m_pIServer. That's a member of IDeviceServer but it also has type IDeviceServer* ?!
    – MSalters
    Aug 22, 2011 at 12:45
  • No, no, m_pIServer is member of DeviceServer, and IDeviceServer is friend of DeviceServer.Sorry for confusion.
    – cnd
    Aug 22, 2011 at 13:17

1 Answer 1

1

Usually occurs when you have redefined the class in a generic class/method and pass in an object of the old class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.