I'm stuck in this trouble where the compiler says:
Incompatible types: 'AnsiChar' and 'Integer'
to the last element of AnsiChar array, that is a integer that is a null termination. How fix it?
C++ code:
static const BYTE myarray[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 0 };
SOCKET s;
// Usage example:
if(Send(s, (char *) myarray, sizeof(myarray), 0) <= 0)
return;
My attempt in Delphi:
var
MyArray: array [0 .. MAX_PATH] of AnsiChar = ( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 0 );
S: TSocket;
// Usage example:
send(S, MyArray, Length(MyArray), 0);