PDA

View Full Version : invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]



ckvsoft
5th September 2016, 21:57
Hi

Please can anyone help me?
i got this error.

Fehler: invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]
transmit(ASIGN_ACOS_AID_DEC, 12);


i have defined
#define ASIGN_ACOS_AID_SIG "\x00\xA4\x04\x00\x07\xA0\x00\x00\x01\x18\x45\x43"

and
^
transmit needs (const unsigned char *txBuffer, unsigned long txLength)

how can i call transmit with ASIGN_ACOS_AID_SIG or how i must define ASIGN_ACOS_AID_SIG

lg Chris

anda_skoa
6th September 2016, 00:52
You could cast or use a properly typed constant instead of a pre-processor macro.

Cheers,
_

ckvsoft
18th January 2017, 10:35
thx
i use constants now.

lg Chris