Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Using typedef to Curb Miscreant Code

Typedef declarations help create platform-independent types and can even hide complex or unintelligible syntax. Predictably, however, using typedef comes with its own set of surprises. Learn how to navigate these pitfalls and use typedef to clean up your code.




Application Security Testing: An Integral Part of DevOps

typedef declaration, or a typedef for short, creates a new name for an existing type. As such, it is often used in writing more aesthetic and readable code. Aesthetics not withstanding, typedefs can also hide unwieldy syntactic constructs and platform-dependent datatypes, thereby enhancing portability and future maintenance. The following sections show how to exert the power of typedef while avoiding common traps.

How to create platform-independent datatypes and hide cumbersome, if not unintelligible, syntax?

Use typedefs to create synonyms for existing types.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date