Re: void * pointer convert problem.



tmp123 <tmp123@xxxxxxxxx> wrote:

> b) Have structures different sizes? Two workarounds (assertion:
> sizeof(char)==1):

sizeof( char ) is 1, always, by definition.

> b2) Do not use a local, and get the size each time:

> bPtr=((char *)bPtr)+(hbt == PROC_TIMING_BIN)?

> sizeof(hPtr->ptBin[0]):

> sizeof(hPtr->etBin[0]) );

This strikes me as rather grotesque abuse of the ?= operator.

Additionally:

It is proper Usenet etiquette to include the relevant portions of the text
you are replying to. To do this using Google groups, please follow the
instructions below, penned by Keith Thompson:

If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.

--
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.
.



Relevant Pages

  • Re: function returning a string?
    ... string to a field of a structure. ... else {donesocarryon();} ... Note that you pass ggets the address of a pointer to char. ... "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Library Not Registered
    ... I have a problem when I access a specific website. ... bottom left corner. ... The exact error message is as follows: ... Char: 4 ...
    (microsoft.public.windows.inetexplorer.ie6.setup)
  • Re: is there a way to do this...
    ... Gnus users may show the referer article by pressing ^ char. ... you are right about repling and following up. ... Regards. ... > the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: Why is "Hello World" const char* ?
    ... > Nope, it evaluates to an array of char, which converts to pointer ... > applied to the array value). ... foo = "barfoo"; is perfectly legal, except you may never find the ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.cpp)
  • Re: Why is "Hello World" const char* ?
    ... > Nope, it evaluates to an array of char, which converts to pointer ... > applied to the array value). ... foo = "barfoo"; is perfectly legal, except you may never find the ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)