Parallel Processing and Lambda expressions in C++11 – Part 1

One of the exciting new features introduced with C++11 is lambda expressions. .NET has had these for a while so its nice to be able to use them in C++ too. A common task in video processing and graphics is to perform some operation over an image. When doing this you’ll typically process the image buffer a row at a time as this speeds up processing. Microsoft have introduced the Concurrency Runtime with their C++11 compiler. This gives you the ability to process the image in a parallel fashion. If you’ve got Visual Studio 2013 and have installed the help,…
Read more →

Polymorphism in C++ and C#

I went for an interview for a C++ job one time and they showed me the following code and asked me what the output would be:

Really this is a question about inheritance and polymorphism in C++. The class description is the base class and the classes sphere and cube inherit from it. Because the description has declared it’s method print() as virtual a vtable is created under the hood for that class and method. Any class that derives from description is allowed to override it’s definition of print() and use its own. The definition of the print() method…
Read more →

1 2