Class Member Access / C Style Cast Operators
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 with the VTC C Plus Plus fundamentals. I wanna wrap up our conversation on operators here by looking at the C's file cast operators and uh confirming that they are still there in C Plus Plus. We have two kinds of uh basic conversion; we have the an implied or implicit conversion and there you see we have a character A equals 100 and B is an integer is equal to zero and B equals A. A will be promoted a number of bytes will be bit uh extended to the left to get character A to fill out uh the multiple bytes of an integer B. So that's an implied conversion that the compiler in the language will take care of for us. An explicit conversion is one that we want to be sure that we have control over and we know exactly what's going on and there are two types of those. There's a C type and there's a new C Plus Plus functional conversion. Again we have our character A equal to 100 and we have our integer B equal to zero. Here B equals int inside parenes of A so that is producing the explicit type casting of A from a character to an integer. So the A will be changed to an integer value, again bit extended, extended to the left and so on before it's provided for B to be assigned into B. This second type is the new functional conversion we call an integer function against A and that will produce a result in the integer value of A and A was 100 so that'll produce 100 which will be put into B. So our C style cast operators are still there with one slight change for the functional uh conversion type, both implicit and explicit conversions.
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 