Re: difference between typedef and #define
- From: "Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 20:38:56 -0400
Drew Myers wrote:
> [...]
> But if I, without using typedef or #define write:
>
> int* i,j,k; // * next to int and not next to i
>
> all of the variables are int*, whereas:
>
> int *i,j,k; // * next to i and not next to int
>
> produces the results you explain. Why does typedef/#define
> behave differently than typing it out as I did above?
It doesn't. _You_ are mistaken. The two operators you wrote behave
in _exactly_the_same_way_: the 'i' gets the type 'int*', the rest of
them get the type 'int'.
V
.
- References:
- Re: difference between typedef and #define
- From: Drew Myers
- Re: difference between typedef and #define
- Prev by Date: Re: difference between typedef and #define
- Next by Date: Re: difference between typedef and #define
- Previous by thread: Re: difference between typedef and #define
- Next by thread: Re: difference between typedef and #define
- Index(es):
Relevant Pages
|