VC++ 6.0 project error "more than one operator "+=" matches these operands"

91 Views Asked by At

I'm currently working on a project developed on VC++ 6.0.

Rapidly the project consist to upgrade the project for the newer version of windows.

The source file that is posing the problem is used to manage the display of some information with the HTTP protocol.

Here is the part with errors :

DWORD CChronoSocket::reply_http(DWORD i, const char * sin){
const unsigned char * in = (const unsigned char *) sin;
CString data = "";
while (*in)
    if (*in<128) 
        data += *in++;
    else 
        data += 0xc2+(*in>0xbf), //more than one operator "+=" matches these operands
        data += (*in++&0x3f)+0x80; //more than one operator "+=" matches these operands


CString header;

DWORD length = strlen(data);

header  = "HTTP/1.0 200 OK\r\n";
header += "Server: ChronoMaster Server\r\n";
header += "Expires: Sat, 01 Jan 2000 00:59:59 GMT\r\n";
header += "Pragma: no-cache\r\n";
header += "Content-type: text/json; \r\n";
char buff2[32];
sprintf(buff2, "Content-Length: %d\r\n", length);
header += buff2;
header += "\r\n";
::send(struct_socket[i].sock, header, header.GetLength(), 0 );

::send(struct_socket[i].sock, data, length, 0 );

return 0;}

I think I understand it's a problem with the format in the two sides of the operator but where I try to convert in other formats my program is not working.

Thanks in advance for your help

And sorry for my bad English ^^'

0

There are 0 best solutions below