Re: void * pointer convert problem.
- From: Christopher Benson-Manica <ataru@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 19:50:00 +0000 (UTC)
tmp123 <tmp123@xxxxxxxxx> wrote:
> a) If the field key has the same offset in both strutures (proc and
> exec), then you can use anyone:
I don't believe that's a portable assumption. The structures could
have different padding bits, so unless key is the first element (in
which case all is well, as structs can always be converted into a
pointer to their first element),
> if (key < (proc_timing_bin_p *)bPtr->key ) ...
need not work. It still doesn't fix OP's other problem, in which he
attempted to increment the void pointer.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
.
- Follow-Ups:
- Re: void * pointer convert problem.
- From: nelu
- Re: void * pointer convert problem.
- References:
- void * pointer convert problem.
- From: Eric J.Hu
- Re: void * pointer convert problem.
- From: Christopher Benson-Manica
- Re: void * pointer convert problem.
- From: Eric J.Hu
- Re: void * pointer convert problem.
- From: tmp123
- void * pointer convert problem.
- Prev by Date: Re: Printf question.
- Next by Date: Re: How to stop reading a file?
- Previous by thread: Re: void * pointer convert problem.
- Next by thread: Re: void * pointer convert problem.
- Index(es):