Enums / Typedef Types
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
This is Tim Heagarty again with the VTC, Virtual Training Company video training course on C Plus Plus Fundamentals. Here's a quickie for us, typedef, these are typedef types and we kind of just tucked this here on the tail end of this section, because it kind of goes along with it but you already know about it from C. Nothing new for C Plus Plus, typedef simply causes one type to be known by a different name. Typedef does not add any new types it just makes things a little easier for us to read. For example there's a typedef of a charstar, a character pointer. Called pchar or pointer to character, there we have typedef an unsigned long as a ulong. There's a typedef of a character called field and it'll be in a array of 50 bits. Then we can use those bys saying like Pchar, new pointer, so that will create a new charstar and field, member name would create maybe in a database a piece of code that we're working that creates member name as a character of length 50. So very simple, actually is just there so that makes things more readable for us, increases readability, little simpler to work with in your code and hopefully reduces some errors and some confusion when your looking at the code at two o'clock in morning a year after you wrote it. So typedef.
Tutorial Information
| Course: | C++ Fundamentals |
| Author: | Tim Heagarty |
| SKU: | 33797 |
| ISBN: | 1-934743-09-7 |
| Release Date: | 2007-09-14 |
| Duration: | 4 hrs / 55 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 