Quote:
Originally Posted by DebianJ
pos=(ERR_SEX_BEN * 10) + err_caec[ERR_SEX_BEN][DETALLE];
strcpy(valor_detallechar[pos],regcaec.sexben);
and regcaec.sexben was defined like this:
struct r1
{
char tipreg,sexben,coneme,perred,asipre;
} regcaec;
I think your problem is that you are trying to copy a single character. You have to do this as:
valor_detallechar[pos]=regcaec.sexben;
The thing is that valor_detallechar[pos] is used to calculate the position where the code will act (the pointer in your error), while the regcaec.sexben, being a character, is treated as ascii code (integer).
I mean, strcpy requires strings (pointers to the base of the strings, actually) as arguments. Your second argument is not "const char *src".
I haven't been terribly clear, but hope that this helps.