Re: Typedef or not
- From: rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos)
- Date: Tue, 28 Feb 2006 14:24:41 GMT
Ronny Mandal <ronnyma@xxxxxxxxxxx> wrote:
Typedef struct { int foo, bar } FooBar;
struct FooBar { int foo, bar };
What woul be the only difference here; just that I can create new
instances by 'Foobar fb, *pfb', and the second demands that I prefix with
struct? struct FooBar fb, *pfb?
Yes. There are, IYAM, only two cases in which this is useful:
- you are lazy and do not care about clarity;
- you are defining an abstract data type.
Richard
.
- References:
- Typedef or not
- From: Ronny Mandal
- Typedef or not
- Prev by Date: Re: Way for computing random primes in standard C.
- Next by Date: Re: Hellp with type promotion
- Previous by thread: Re: Typedef or not
- Next by thread: Re: Typedef or not
- Index(es):