char messaggiou[100];
char *name2;
string encoded;
name2 = (char*)malloc(encoded.length() + 1);
strcpy(name2, messaggiou);
strcpy(encoded.c_str(), name2);
const char* hex_str = name2;
I get an error with this code (simplified), with vs2015 in C ++.
error C2664: `'char *strcpy(char *,const char *)': cannot convert argument 1 from 'const char *' to 'char *'
P.s In messaggiou there is an encrypted string in hex