|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: typedef
In a message dated 9/7/00 9:37:23 PM Central Daylight Time, dakline@vassar.edu writes: << all the time. I've done it with structures too, I believe. Am I missing something here? What's the advantage of the typedef? >> Typedef, by custom (at least in MY programming circles) is used for VERY simple type declarations. For example, you may use a typedef to define an "unsigned short" as "word" or "ushort" (which is already assumed in many languages, anyway). Thanks to the uses of structs, classes, unions, etc., typedef is no longer needed. Generally, though, typeful is used for simple type declarations, and classes/structs/etc. are used for more complex type declarations. This is just a custom, however. Use classes if you wish. There's no advantage here. There's always more than one way to accomplish something in programming. Some work better than others. In many cases, however, there's really no difference. -Ender Wiggin ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|