Is there a macro for determining the address of the end of an object? For
example, if f is a pointer to an instance of the below struct, endof(f->a)
would be equal to the address of member b.
struct foo {
int a[N];
int b;
};
If not, is the following sufficient in all cases?
#define endof(o) ((char *)(&(o)) + sizeof(o))
Mike
example, if f is a pointer to an instance of the below struct, endof(f->a)
would be equal to the address of member b.
struct foo {
int a[N];
int b;
};
If not, is the following sufficient in all cases?
#define endof(o) ((char *)(&(o)) + sizeof(o))
Mike
Comment