Re: Question about void pointers
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Tue, 16 Sep 2008 15:52:24 -0400
s0suk3@xxxxxxxxx wrote:
On Sep 16, 12:51 pm, Eric Sosman <Eric.Sosman@xxxxxxx> wrote:s0suk3@xxxxxxxxx wrote:On Sep 16, 12:06 pm, vippstar@xxxxxxxxx wrote:"This kind of task" was an artificial bit of code specificallyOn Sep 16, 7:59 pm, s0s...@xxxxxxxxx wrote:Well, perhaps the OP doesn't need portability (or at least not thisOn Sep 16, 11:51 am, raph...@xxxxxxxxx wrote:You can have the "worst advice of the month" clc award.On Sep 16, 4:20 pm, vipps...@xxxxxxxxx wrote:No, to unsigned char *. But if your compiler can do it with the voidb = ((unsigned char *)b) + 5 * sizeof *a;I see, got to switch to char * so that it can be incremented properly.
*, then do it with the void *. It's probably specialized for that kind
of stuff anyway.
You have two options, do it portably, or do it with an extension, with
absolutely no loss in efficiency or size, and you advice to choose the
extension.
kind of portability). Besides, void * seems more natural for this kind
of task.
written to experiment with manipulating pointers. An investigative
doodle, nothing more.
No. This "investigate doodle" demonstrated this kind of task. But this
kind of task is also common in real-world programs, and it's
important. I, for one, have actually done this, without realizing I
was using an extension.
Perhaps you should be more specific about what you mean by "this
kind of task," because I (mis?)understood you to be referring to the
code in the original post.
Personally, I'm not as ready as vippstar is to give you theI did not understand a word of that paragraph.
award; we're only halfway through the month. But I'd be surprised
if you weren't on the ballot a couple weeks from now. Have you
chosen your running mate yet?
So you understand English as well as you understand C?
--
Eric.Sosman@xxxxxxx
.
- Follow-Ups:
- Re: Question about void pointers
- From: s0suk3
- Re: Question about void pointers
- References:
- Question about void pointers
- From: raphfrk
- Re: Question about void pointers
- From: vippstar
- Re: Question about void pointers
- From: raphfrk
- Re: Question about void pointers
- From: s0suk3
- Re: Question about void pointers
- From: vippstar
- Re: Question about void pointers
- From: s0suk3
- Re: Question about void pointers
- From: Eric Sosman
- Re: Question about void pointers
- From: s0suk3
- Question about void pointers
- Prev by Date: Re: Question about void pointers
- Next by Date: Re: Question about void pointers
- Previous by thread: Re: Question about void pointers
- Next by thread: Re: Question about void pointers
- Index(es):
Relevant Pages
|