error C3510: cannot locate dependent type library ” {bed7f4ea-1a96-11d2-8f08-00a0c9a6186d} v.2.4

Problem I have recently migrated a C# 2.0 project registered for COM interop to .NET 4.5 and when I imported the type library in a C++ project with no_registry, suddenly I got some errors because the type library could not be imported. Here are the steps to reproduce: create a .NET Class Library project and…

CDatabase bug in MFC in VS2012

After migrating an MFC application from Visual Studio 2008 to Visual Studio 2012 I run into an unexpected error: the application was having problem fetching data from the SQL Server database. After debugging it turned out that function CDatabase::GetConnect that I was using to retrieve the connection string after opening the database (for different purposes)…

Beware of parallelization

A recent question on stackoverflow raised the problem of a fast algorithm to count the unique colors in an image (Faster algorithm to check the colors in a image). My answer what that this kind of problems are suited for parallelization. However, parallelization may only help when used judiciously. To demonstrate the point I have…

cpplinq new operators

There are some new operators available in cpplinq: singleton, generate, pairwise and zip_with. singleton This operator create a range with a single element, specified as argument. Using the operator is straight forward.

generate This operator creates a range using a given predicate.

pairwise Generates a new range of pairs by grouping adjacent elements…