error C2679: binary '=' : no operator found which takes a right-hand operand of type 'unsigned short [260]' (or there is no acceptable conversion)

  • Thread starter Thread starter VHK1009
  • Start date Start date
V

VHK1009

Guest
Hello, I am upgrading MFC solution from VC++ 6.0 to Visual Studio 2013, below compilation issue is getting in VC ++ 2013 and the same piece of code works fine in VC++ 6.0. Below is the code causing the subjected error.


DataRecord dataRec;
char delimiterFF;
char delimiterFE;

short recordLenth;

unsigned short fieldLenth;
unsigned long fieldLenthW;

//dongx 2012/03/26 modify the tatile length
unsigned char fieldValue[MAX_PATH *2 ];
unsigned short fieldValueW[MAX_PATH];
//dongx 2012/03/26

fread(&delimiterFF, 1, 1, fp);
//if(delimiterFF)
fread(&recordLenth, 2, 1, fp);
//recordLenth
dataRec.RecordLength=recordLenth;

//dongx 2012/02/14 modify the StaffTitle
for(int j=0;j<17;j++){
fread(&delimiterFE, 1, 1, fp);
fread(&fieldLenth, 2, 1, fp);

fread(fieldValue, fieldLenth, 1, fp);

fieldValue[fieldLenth]='\0';
fieldLenthW=fieldLenth;
if (!CryptDecrypt(hKey, 0, TRUE, 0, fieldValue, &fieldLenthW))
{
GetLastError1();
}
memcpy(fieldValueW, fieldValue, fieldLenthW);

fieldValueW[fieldLenthW/2]='\0';
if (j == 0)
{
dataRec.CustNo = fieldValueW;//******************* ERROR LINE
}

Continue reading...
 
Back
Top