A reference that is not to 'const' cannot be bound to a non-lvalue

Posted by Bert on Stack Overflow See other posts from Stack Overflow or by Bert
Published on 2010-04-23T18:40:08Z Indexed on 2010/04/23 18:43 UTC
Read the original article Hit count: 335

Filed under:
|

Hello,

Am struggling a bit with this.

Am declaring:

BYTE *pImage = NULL;

Used in call:

m_pMyInterface->GetImage(i, &imageSize, &pImage);

Visual C++ 2003 compiler error: error C2664: 'CJrvdInterface::GetImage' : cannot convert parameter 3 from 'BYTE **__w64 ' to 'BYTE **& ' A reference that is not to 'const' cannot be bound to a non-lvalue

The method called is defined as:

void CMyInterface::GetImage(const int &a_iTileId, ULONG *a_pulImageSize, BYTE** &a_ppbImage) {

(...)

Any help much appreciated, Bert

© Stack Overflow or respective owner

Related posts about c++

Related posts about const