advantage of using typedefs
- From: "junky_fellow@xxxxxxxxxxx" <junky_fellow@xxxxxxxxxxx>
- Date: 27 Jan 2006 23:55:30 -0800
I was looking at the source code of linux or open BSD. What I found
that lots of typedefs
were used. For example, consider the offset in a file. It was declared
as
off_t offset;
and off_t is typedefed as
typedef long off_t;
I wanted to know what advantage do we get by typedefs ? Why we did not
declare
offset simply as
long off_t;
Similar is the case with size of file and so on.....
Does any one has any clue of why do we use typedefs in such cases ?
Thanx for any help advance ....
.
- Follow-Ups:
- Re: advantage of using typedefs
- From: John Bode
- Re: advantage of using typedefs
- From: Rod Pemberton
- Re: advantage of using typedefs
- From: Chris Torek
- Re: advantage of using typedefs
- From: Jordan Abel
- Re: advantage of using typedefs
- From: Emmanuel Delahaye
- Re: advantage of using typedefs
- Prev by Date: Re: Question about the clc string lib
- Next by Date: Re: NULL returned by fopen - where is a list of what's causing the error?
- Previous by thread: Casting return value to fit within constraints of error values (portability)
- Next by thread: Re: advantage of using typedefs
- Index(es):
Relevant Pages
|