You cannot portably do arithmetic with a void *
pointer. This makes sense, since it's a pointer to an unknown type of data, that data has no intrinsic size. The size of the pointed-to data is a central part of doing arithmetic.
usually a "byte" pointer works:
int *ptr = (int *) ((unsigned char *) info + row->offset);
The above assumes that row->offset
is a byte offset, not an int
offset. If you want the latter, cast accordingly:
int *ptr = (int *) info + row->offset;