Re: void * pointer convert problem.
- From: "tmp123" <tmp123@xxxxxxxxx>
- Date: 30 Dec 2005 11:26:25 -0800
> 317 void* bPtr;
> 325 bPtr = (proc_timing_bin_p)(&hPtr->ptBin[0]);
> 329 bPtr = (exec_timing_bin_p)(&hPtr->etBin[0]);
> 342 if(key < bPtr->key)
Hi,
a) If the field key has the same offset in both strutures (proc and
exec), then you can use anyone:
if (key < (proc_timing_bin_p *)bPtr->key ) ...
b) If the offset is not the same, your request has no solution. The
most near is:
if (key < (hbt == PROC_TIMING_BIN)?(proc_timing_bin_p
*)bPtr->key:(exec_timing_bin_p *)bPtr->key ) ...
Kind regards.
.
- Follow-Ups:
- Re: void * pointer convert problem.
- From: Christopher Benson-Manica
- Re: void * pointer convert problem.
- From: Eric J.Hu
- 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
- void * pointer convert problem.
- Prev by Date: Re: void * pointer convert problem.
- Next by Date: Re: Style War (was: integers to binary)
- Previous by thread: Re: void * pointer convert problem.
- Next by thread: Re: void * pointer convert problem.
- Index(es):
Relevant Pages
|