Tagged: Typedef


Programming in C: Typedef

What if ther was a way to name a certain type, and then use that name across your program?  That way, if that particular type needed to be changed, say to be an int instead of a char, you could specify that in one place.  Well, that’s where the typedef  statement comes in. However, typedef’s can be a mixed bag, if used too much you acquire obfuscation in your code, but if used to little, you may end up having to edit your code in multiple places; or you may end up with code whose purpose is difficult to understand.