C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

Concurrent Containers
Feb 3, 2011
0
0

Concurrent Containers

Diego Dagum - MSFT
Diego Dagum - MSFT

A recurrent question (well, one of the many) is about STL containers and whether they are thread safe.Taking Stephan’s words here, the reality is that they aren’t, not as a bug but as a feature: having every member function of every STL container acquiring an internal lock would annihilate performance. As a general purpose, highly reusable library, it wouldn’t actually provide correctness either: the correct level to place locks is determined by what the program is doing. In that sense, individual member functions don’t tend to be such correct level. // This article tells more about Thread...

PDC 2010: Lambdas, Lambdas Everywhere
Feb 1, 2011
0
0

PDC 2010: Lambdas, Lambdas Everywhere

Diego Dagum - MSFT
Diego Dagum - MSFT

Why care about C++0x lambda functions? Syntactically, they are nothing but sugar for function objects. However, they are an essential and enabling sugar that will change the way we will write C++ code more often than most people realize. This talk from last PDC covers what lambda functions are and how to use them effectively, including how lambdas touch many wide-ranging kinds of code — from their convenience when writing concurrent and scalably parallel code, to how they stand to revolutionize STL usability and programming, to how they enable such small conveniences as local functions and local variable i...

The Visual C++ Weekly Vol. 1 Issue 5 (Jan 29, 2011)
Jan 29, 2011
0
0

The Visual C++ Weekly Vol. 1 Issue 5 (Jan 29, 2011)

Diego Dagum - MSFT
Diego Dagum - MSFT

This week comes with an article to help you set your application for parallelization; C++ MVP Dan Rollins researches on various ways to implement properties in C++; Issam Iqbal, C++ MVP, gives another twist to the TO CLI or NOT TO CLI debate when creating unit tests for our unmanaged code (voting for “NOT TO CLI”). There are also a couple of code samples, one for creating Dynamic Link Libraries and the other one on Internationalization. We are also complementing for the first time our C++ coverage with entrepreneurial stuff for micro independent software vendors (micro ISVs, organizations composed for...

Heritage Shared
Jan 28, 2011
0
0

Heritage Shared

Diego Dagum - MSFT
Diego Dagum - MSFT

A few days ago, we posted two C++ quizzes based on a question posted in a forum. Let’s review the first question   Quiz 1   The guy was frustrated because he expected two things: Instead, he got the following compile-time error at that same line e:\foo.cpp(30): error C2660: 'Bar::DoStuff' : function does not take 0 arguments The root of this compilation error is at line 11: as we are closing the definition of class Bar without saying anything ...

Parallel Programming with Microsoft Visual C++ (Book in Progress)
Jan 26, 2011
0
0

Parallel Programming with Microsoft Visual C++ (Book in Progress)

Diego Dagum - MSFT
Diego Dagum - MSFT

The patterns & practices group is writing a new guide that will introduce Visual C++ programmers to patterns for including parallelism in their applications. Examples of these patterns are parallel loops, parallel tasks and data aggregation with map-reduce. Each pattern has its own chapter. Each chapter includes a description of the problem, an example of where the pattern is applicable, and code that implements the solution. On this site you will find; a preliminary draft of the book, the accompanying code samples and answers to the end of chapter questions. The authors just dropped chapters 4 and 5 in CodeP...

Sharing the Heritage (Quiz Game)
Jan 25, 2011
0
0

Sharing the Heritage (Quiz Game)

Diego Dagum - MSFT
Diego Dagum - MSFT

I was reading recent discussion threads and found something interesting that someone introduced as a question, but instead of start developing the whole story from here, I’ll just challenge you with two different quiz games. Quiz 1 Without using Visual Studio or your building tool of preference, just your knowledge, if we tried to run this code, what is expected to see in the console? Why?Now let’s make a little variation and substitute the method getting no arguments for one getting char, as follows: Quiz 2 If we ran this new ...

The Visual C++ Weekly Vol. 1 Issue 4 (Jan 22, 2010)
Jan 22, 2011
0
0

The Visual C++ Weekly Vol. 1 Issue 4 (Jan 22, 2010)

Diego Dagum - MSFT
Diego Dagum - MSFT

Paperli.PaperWidget.Show({ pid: 'visualc/news', width: 200, background: '#000666' }) Greetings!! The 4th issue of The Visual C++ Weekly is out there. This issue starts with an article due to C++ MVP Marc Gregoire on an extension that Visual Studio 2010 SP1 Beta brings to Microsoft Foundation Classes (MFC) to allow animations. A book of techniques in reengineering patterns for object-oriented applications is available for download by its authors. C++ MVP Giovanni Dicanio reveals a cost-efficient way to deal with bidimensional matrices. Gus Class (Windows Development) shows how he builds VC project...

Feedback Wanted: Participate in User Experience Research on the Visual Studio Help Experience
Jan 18, 2011
0
0

Feedback Wanted: Participate in User Experience Research on the Visual Studio Help Experience

Diego Dagum - MSFT
Diego Dagum - MSFT

Microsoft is working to provide developers the next experience with local documentation. Last December, the Library team released the SP1 beta version of its Microsoft Help Viewer for Visual Studio. Additionally, there are a number of changes and improvement being made on the local Help Viewer, as well as MSDN and other documentation-related assets at Microsoft. As part of ensuring that our efforts align with and respond to the needs and desires of our customer, the Microsoft Developer Division is increasing the user research conducted on its assets. For us to better understand your needs and desires, we nee...

Herb Sutter: “Coding, like Speaking a Language, Implies that You Think in that Language”
Jan 18, 2011
0
0

Herb Sutter: “Coding, like Speaking a Language, Implies that You Think in that Language”

Diego Dagum - MSFT
Diego Dagum - MSFT

Erik Meijer –host of the “Expert to Expert” series in Channel 9- interviews Herb Sutter -an Architect on the VC++ team and chair of the C++ Standards Committee.In this thought-provoking talk, Herb and Erik cover generic programming, function objects, lambdas, futures and argument passing by value vs. by reference, among other topics. This talk is very interesting for those who already know C++ but never thought about the reason why some of its features were designed the way they are. This talk is also useful for those developers coming from managed languages, who are looking to native deve...