int *ASCB; int *ASXB; ASXB = ASCB + 0x6c; because ASCB is a pointer to int, and int has sizeof = 4, you are in fact adding 4 * 0x6c to ASCB, that's your problem.
use the following notation, and it will work: ASXB = (int *) ((char *) ASCB + 0x6c); first you cast the ASCB to a char *, then you REALLY add 0x6c, and then you cast the result back to int *. That's C ... the other solutions suggested (templates etc.) are C++ and don't apply in your case. HTH, kind regards Bernd Am 08.02.2018 um 17:45 schrieb Barkow, Eileen:
Thank you Charles and Seymore. I thought that the problem had something to do with adding to pointers but I could not find any doc about it in the manuals. I am still not sure that I understand how to fix it but I will try based on your info.
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
