Introduction to C++ 11 Series – Part 8, Lambda Expression or Functions

Monday, April 1, 2013

One of the most important features of C++ 11 is the addition of Lambda, an inline function mechanism (and a closure). Motivation The first motivation is to make this a valid C++ code: (){}(); There are many reasons to use lambda and functional programing; for example, STL algorithms use function or functor objects. STL <functional> provides a set of functors such as plus, minus, less, equal_to, etc. Most of these functors are binary functions, i.e. they take two parameters. To use a predefined binary functor in an STL algorithm, you need to...

Introduction to C++ 11 Series – Part 6, auto – an old keyword with new meaning

Wednesday, March 27, 2013

Originally, auto declares a variable in the automatic storage, which is also the default behavior. This is still the behavior of the C language. In C++ 11, auto declares a variable, whose type is deduced from the initialization expression. If you are familiar with the C# var keyword, auto is almost the same. The main difference is that modifiers such as const, &, *, **, &&, static, and volatile can be added to the auto to enhance type declaration. auto is a productivity feature, it lets you write code faster. auto is also an abstraction enhancer; you...

Introduction to C++ 11 Series – Part 5, Copying & Re-throwing exceptions

Monday, March 25, 2013

Many of the new features of C++ 11 came from a real need, not just to make the language more productive but also to enable real-life scenarios. The ability to catch exception in one place in runtime environment and to re-throw it later came from the need to provide a better concurrency support in the language and libraries. C++ 11 has many new concurrent abilities that I will talk about in future posts, but now let us just say that we have, in standard C++, the ability to create and use threads. In order to understand why we need...

Introduction to C++ 11 Series – Part 3, Local & Unnamed Types as Template Arguments

Saturday, March 23, 2013

In this post, I am going to write about a new feature, that your response might be “Ha! I didn’t know I can do that”. The old C++ standard says that local types, unnamed types and in general, types with no linkage, shall not be used as template arguments. In C++ 11 this has been solved: local types have the same linkage as their enclosing function Unnamed types have the same linkage they would have if they were named To show the change look at this code: ...

The C++ 11 Standard & Visual Studio – Introduction

Thursday, March 21, 2013

  C++ 11, formerly known as C++0x, was published as ISO/IEC 14882:2011 in September 2011. The standard document is available for a fee, however the most recent draft, before the release, was N3242 and the most recent working draft freely available is N3337, dated 26 January 2012. C++11 includes several additions to the core language and extends the C++ standard library incorporating most of C++ TR1 libraries and many other features, most of them originated from the boost library. C++ 11 is a new language and as such, you need to learn what is in there for you...

Message Only Window in for .NET Application

Monday, December 26, 2011

  Overview .NET is great platform, it speeds up the development process, you deal with your application logic and in most cases you don't need to know that there is whole Windows operating system down there. However sometimes you do need to program against Windows without the .NET assistance. As a Windows developer, you need to keep all your weapons ready, be it .NET, COM or C++ with the native Win32 API. In this article I am going to show how to deal with Windows Message based communication protocol within .NET application. Windows Messages In traditional User32.dll based Windows application the Windows...

C++ Renaissance: The Asynchronous Agents Library

Saturday, April 2, 2011

Visual Studio 2010 brings back the power of C++. The new language capabilities and optimized STL libraries, the developers productivity as well as the resulting executable performance are much higher. In this post I’d like to present one of the abilities of the ConcRT Asynchronous Agents Library. Agent is based on the Actor Model and is one of the building block of a Concurrent Dataflow Network. The idea behind the Asynchronous Agent Library is that you build a network from agents and message blocks. Messages are sent from agent and blocks to other agents and . The ConcRT scheduler...
5 comments

MSDN Israel Event–Introducing Windows Azure

Thursday, January 20, 2011

Arnon and I would like to thank all the people that attended today the Introducing Windows Azure lecture. The feedbacks (verbal and written) were great, thank you. As I said in the lecture, one of the best ways to further learning how to develop to Windows Azure is the Windows Azure training kit. Beside that you can watch and read the materials from the last PDC. To those of you that couldn't come to this event, I will briefly describe what we delivered: In the first lecture we introduced the whole cloud concept, we showed...

Help me to use the Help System of VS 2010

Tuesday, April 6, 2010

One of the new features of VS 2010 is the new Help system. During the MVP Summit we have introduced to the new system which has very good foundation, but the viewer that comes with VS 2010 is lack of many features that we used to have and loved such as the TOC, Index, Synch TOC, etc.   Fortunately there is a tool (H3Viewer) that provides the missing features:   In the site you can also find the mshcMigrate tool that enable the migration of old MS Help files...
one comment