The Visual Lounge lets you find out about TechSmith behind-the-scenes. Watch screencasts and videos from other customers, meet up with your fellow TechSmith users and staff, and get more tips and tricks!

RSS iconSubscribe to RSS feed

Dev Corner - Cast Operator

Posted on Friday October 28, 2011 by Randall Brown

Today's Dev Corner post is brought to you by AJ Orians.

The cast operator is not well known so I'll explain what it is and how it can be used. To start off POD stands for Plain Old Data in C++ which is things like int, char, double, etc. Unfortunately you cannot inherit off of such datatypes. One advantage of inheriting is you can cast to the base type (assuming public inheritance). With the cast operator you'll be able to specify types that your object can cast to. Below is a simple example showing how the cast operator works:

As you can see I am able to cast the object of type A to an int type. Do you now understand the cast operator? Do you see yourself having a use for it? Let me know what you think!

aj devcorner.jpg

Andrew "A.J." Orians is a developer on the Windows version of Camtasia Studio. Though he enjoys programming he also likes puzzles, running, games, and a whole slew of other activities. He has been at TechSmith for something like five years and looks forward to being here for many more!

Post a comment


Can't read image


Type the characters you see in the picture above.

Currently Reading:
“Dev Corner - Cast Operator”

This page contains a single entry from The Visual Lounge posted on October 28, 2011 8:59 AM.


Previous entry:
Dev Corner - Viewing a Gdiplus::Bitmap in the VS debugger.

Next entry:
High Tech Halloween Pumpkin Carving.


All recent entries can be found on the main page or by looking through the archives.