Re: pointer-to-pointer (invalid lvalue in unary `&)
From: Chris Fogelklou (chris.fogelklou_at_comhem.se)
Date: 04/04/04
- Next message: Chris Torek: "Re: malloc + 4??"
- Previous message: Leor Zolman: "Re: structs help"
- In reply to: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Next in thread: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Reply: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Reply: Martin Ambuhl: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 04 Apr 2004 17:04:08 GMT
> That doesn't seem very fruitful advice. He'd be better off trying to
> understand the type system than trying to learn how to circumvent it.
>
Yep.
>>changing your debugging process from finding a syntax
> > error to figuring out why your computer is crashing :)
>
> Finding the syntax error is much easier
Hence the smiley and the statement that he would have to figure out why the
computer is crashing (sarcasm... oops... my bad :)
> > pointer = (struct example_struct **pointer)&ex_ptr;
>
> That cast is badly-formed, and requires a diagnostic.
Hmm... It compiles on my system... but from the other posts/responses I've
been participating in, I think my system might be broken. Could you please
elaborate?
typedef struct ui_tag {
uint16 i;
uint16 j;
uint16 k;
uint16 l;
} ui_t, *pui_t;
void main(void)
{
struct ui_tag * ptr_ui;
struct ui_tag ** pptr_ui;
struct ui_tag ui = {0,0,0,0};
ptr_ui = &ui;
pptr_ui = (struct ui_tag **)&ptr_ui;
while(1);
}
- Next message: Chris Torek: "Re: malloc + 4??"
- Previous message: Leor Zolman: "Re: structs help"
- In reply to: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Next in thread: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Reply: Richard Heathfield: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Reply: Martin Ambuhl: "Re: pointer-to-pointer (invalid lvalue in unary `&)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|