The Wayback Machine - https://web.archive.org/web/20120101191220/http://www.codeguru.com:80/cpp/cpp/

    C++

    How to Make Fewer Errors at the Stage of Code Writing. Part N3.

    This third article in the series discusses a couple of new programming methods that can help you make your code simpler and safer.

    SSE2 Vectorization of Alphablend Code

    Wong Shao Voon shows you how to use SSE2 to Speed up Alphablending.

    How to Make Fewer Errors at the Stage of Code Writing. Part N2

    This is the second article on avoiding certain errors at the early stage of code writing. In the previous post, we have already advised you to avoid a large number of calculations in one expression. However, we should investigate this question in detail. Let's see what's dangerous about complex expressions and how we can avoid many logical errors.

    90 Errors in Open-Source Projects

    The materials collected in this article will be useful for authors of articles, books and blogs. Examples of errors can be used to demonstrate the advantages of different programming styles -- for instance, why you should not try to make your code shorter by writing long expressions.

    Leo Tolstoy and Static Code Analysis

    Andrey Karpov checks Apache HTTP Server with PVS-Studio and discusses the errors and false reports returned.

    A Time Zone API supplement

    Microsoft has an extremely limited set of Time Zone functions. This API will allow the full use of Time Zones in your Windows App.

    C++ 2011: nullptr

    C++ used to lack a special value to indicate a null pointer, which led to some problems. The new standard introduces a new reserved word nullptr, to designate a constant rvalue that represents a null pointer. Read on to learn more.

    C++ 2011: Strongly-typed Enums

    Strongly-typed enumerators, provided by the new C++ standard, solve the known problems with the traditional enumerators. The new standard brings a new kind of enumerator, introduced with 'enum class,' called strongly-typed enums.

    C++ 2011: Uniform Initialization

    Learn about the uniform initialization syntax and semantics available in the new C++ standard.

    Logician: A Table-based Rules Engine Suite In C++/.NET/JavaScript using XML

    Overview of a cross-platform spreadsheet-based rules engine with algorithms implemented in C++ and JavaScript, and wrappers to C#/.NET/Silverlight, Flash, and Mobile Platforms(via PhoneGap).

    Reduce Compilation Dependencies in Large Scale C++ Projects: Factory Pattern

    Changes are inevitable in large projects. This article introduces some useful techniques to minimize compilation time during development.

    Switching to MVVM

    Model-View-ViewModel (MVVM) is a proven design pattern used heavily in many WPF / Silverlight applications. This article focuses on implementing MVVM on existing applications rather than starting a new application. In this article we are going to see how we can take small steps towards MVVM.

    Recursion Primer Using C++ Part 3

    Zeeshan examines all of the Recursion dimensions (compile time/runtime and structure/generative) with the five different types of recursion (Nested Recursion, Binary Recursion, Mutual Recursion, Tail Recursion and Linear Recursion).

    Rubix Cube

    This program presents an original way of the famous Rubik's Cube by an assembly of 27 multi-colored cubies isolated in the space. Even during its deformations, it allows a 3D vision of the cube thanks to the basic MFC graphic functions. This simulation can also rapidly calculate a solution to reordering the Cube.

    Dispelling Common C++ Class Myths

    Read along as Ovidiu presents the differences between 'class' and 'struct' in the C++ programming language.

    C++ Tutorial: The Do's and Don'ts of Accessing One Element Past the End of an Array

    A buffer overflow is the result of writing to an element that is outside the boundaries of an array. And yet, certain algorithms need to access the address of one element past the end of an array, albeit with a few important restrictions. Here's the why and how.

    Five Cents on Arithmetic Encoding

    Learn about a classical arithmetic compression implementation (CACM) optimization.

    MFC: Controlling Notepad From C++ Applications

    Discover how to start and control a third party GUI application, particularly the Notepad text editor, from your own C++ applications.

    Advanced C++ Listcontrol

    Use your C++ Programming skills to create a special list control that allows a control to be inserted in a particular cell.

    Faster Microsoft C++ Programming With The MFC Class Wizard

    During the glory days of MFC and ATL in the 1990s and early 2000s, The Visual C++ class wizard was a highly-used and useful IDE tool that simplified life for developers. The re-introduction of the class wizard, after the absence of a decade, demonstrates commitment to the 'glory day's' ideal and adds simplicity to class management tasks inside the IDE.

    Microsoft Visual Studio: Secure CRT Functions

    Discover how to deal with C4996 warning, what secure CRT functions are and how to correctly use them.

    Five Ways to Improve Your C++ Programming with C++0x Defaulted and Deleted Functions

    C++0x introduces two new function specifiers: =default and =delete. The former instructs the compiler to implicitly define a member function that it wouldn't define otherwise. The latter suppresses the implicit definition of a member function. Find out how to use this mechanism to reduce labor-intensive tasks, improve performance, and make your classes more secure.

    Tips and Tricks for Using WinUnit with Microsoft Visual Studio

    This article deals with advanced-level tips and tricks for using WinUnit, how to integrate WinUnit with Microsoft Visual Studio, and recommended guidelines.

    Unit Testing for Native Applications Using WinUnit

    While it's easy to find a reliable unit testing framework for .NET framework applications like NUnit, it's a challenge to find a similar easy-to-use offering for C++ programming.

    Asynchronous (nonblocking) Client Socket WCrapper Class Without MFC

    Learn to use the implementation of asynchronous Win32 sockets without the use of MFC.

    C++ Programming: A Better Vector Trim Algorithm With Move Semantics

    Vectors are one of the single most useful and most used objects in the STL. They are easy to use, and remove the burden of memory management from the user. It is possible to partially control memory usage by using functions like reserve, but nothing is provided to free up excess memory. Users have come up with ways to trim a vector by hand, but with the advent of the new C++0x and its move semantics, the classic solution of copy-swaping has become excessively expensive. This article seeks to find a better solution.

    C++ Programming: Easy Screen Capture Using MFC/ATL

    Learn to use CScreenImage, an MFC/ATL extension class for screen image captures.

    An Interview with C++ Creator Bjarne Stroustrup

    Bjarne Stroustrup talks about the imminent C++0x standard and the forthcoming features it brings, the difficulties of standardizing programming languages in general, the calculated risks that the standards committee can afford to take with new features, and even his own New Year's resolutions.

    Introducing the Windows Kernel Transaction Manager, Transactional NTFS and Transactional Registry

    Read along as Marc Gregoire provides a brief overview of TxF and TxR to give you an idea of what you can accomplish with it.

    C++ Tutorial: Use std::tuple To Simulate Compact Heterogeneous Containers

    Std::tuple is a compact, fixed size container that packs a variable number of elements of different types. This property makes tuples useful in simulating multiple return types for a function, assigning and comparing multiple values simultaneously and abstracting complex data structures.

    C++ Programming: Understanding Standard C++ Library Additions in Visual C++ 2010

    For every true C++ developer, the Standard C++ Library is the first choice for utility classes, collections and algorithms to streamline the development effort. Continuing on from the investment in core C++ programming improvements in Visual C++ 2008, Visual C++ 2010 introduces improvements in the Standard C++ Library related to C++ 0x, and this article focuses on advancements in Standard C++ collections and algorithms.

    The New MFC Animation API

    This article serves as a brief introduction to the new API allowing users to create animations in MFC applications.

    Improve Microsoft Visual C++ Application Security and Robustness with SafeInt

    In this age of cloud computing, massive parallel systems and complex security threats like identity theft and decentralized botnets, devoting resources to combat the seemingly age-old issue of integer overflow appears distinctly passC). Despite the fact that integer overflow is such a well know problem, particularly within C and C++ programming, the problem remains a real issue from both a defect and security standpoint, that's why the introduction of the SafeInt template class in Visual C++ 2010 to address overflows is a great addition.

    C++ Tutorial: 10 New STL Algorithms That Will Make You A More Productive Developer

    Unquestionably, the most effective tool for a C++ programmer's productivity is the Standard library's rich collection of algorithms. In 2008, about 20 new algorithms were voted into the C++0x draft standard. These new algorithms let you among the rest copy n elements intuitively, perform set theory operations, and handle partitions conveniently. Find out how to use these algorithms to make your code more efficient and intuitive.

    Simplify Visual C++ Application Deployment with Manifest Files

    Application manifest files provide a declarative means for an application to detail its dependencies and runtime requirements. Each version of Windows and Visual C++ adds further options that can be specified in the application manifest file, and it is important for correct application deployment and execution that the Visual C++ developer keeps up to date with these advances.

    C++ Tutorial: Enhance Type Safety and Code Clarity with the nullptr Keyword

    Find out how to use nullptr to avert bugs and simplify the future maintenance of your C++ applications.

    C++ Programming: Memory Mapped Files using RAII

    Learn how to use helper classes for interprocess communication with memory mapped files in C++ on Windows.

    C++ Programming: Better Accessibility with High DPI Support and MFC 10

    A number of factors are driving the requirement for applications to correctly support high DPI settings--increased monitor resolutions are making it more difficult for users to read text on the screen, compliance with disability access legislation is an increasingly important factor for corporations, and users are now expecting applications to behave well at higher DPI settings. MFC 10 and Visual C++ 2010 have built-in support for high DPI, making the development of a DPI-aware application quicker and more simple.

    C++ Programming: CRT Concurrency Runtime: Resource Manager

    The Concurrency Runtime simplifies parallel programming and helps you write robust, scalable, and responsive parallel applications. Come along as we explore the Resource Manager layer of this framework.

    Querying Bing Using the New Windows 7 Web Services C++ API

    Learn how to build client applications that use SOAP based web services.

    C++ Tutorial: The Template Pattern

    Learn how to set up the outline of an algorithm and leave the details of the implementation later using the Template Pattern.

    C++ Programming: STL Hash Container Benchmark

    This article presents a benchmark application which pits the red-black binary tree containers(map, set, etc) against hash containers.

    Choosing the Right Storage for Application Data

    Suppose you have to develop software for managing a custom storage of end-user documents and files. There are several approaches to data storage possible. Right choice of data storage technique will make your software versatile, robust and scalable, while mistakes made at this step will cause additional expenses, loss of competitive qualities and, of course, clients. This article discusses the advantages and disadvantages of each technique.

    Improved Touch Support with MFC 10

    The introduction of the iPad and other slates demonstrates that end users have a strong appetite for touch-enabled experiences. MFC 10 adds comprehensive support for touch functionality, allowing users with tablet PCs and digitizers to interact with applications in a simple, natural manner, including gestures and multi-touch.

    C++ Programming: Versionable Object's Serialization using MFC - Part 1

    Learn about MFC serialization and files version management in dialog applications.

    C++ Programming: Versionable Object's Serialization using MFC - Part 2

    MFC serialization and files version management in Multiple Document Interfaces applications (MDI)

    The Smart Pointer That Makes Your C++ Applications Safer - std::unique_ptr

    Using shared_ptr instead of raw pointers helps you avoid the common pitfalls associated with raw pointers but in some cases, its performance isn't satisfactory. Unique_ptr is a new C++0x smart pointer that is compact, fast and fully compatible with the standard library. Find out how to use unique_ptr to make your code safer without sacrificing performance.

    Using the Windows 7 Ribbon with Visual C++ Applications

    The Office 2007 suite of applications introduced the Ribbon UI element to combine and simplify application toolbars and menus into a single, consistent area for invoking task-specific application commands. Windows 7 ships with a Ribbon control, and Visual C++ developers have easy access to this built-in Ribbon functionality through MFC 10 enhancements.

    Reduce Repetitive Initialization Code in C++ Applications by Using Delegating Constructors

    You're often required to repeat identical pieces of initialization code in every constructor of a class that declares multiple constructors. That's because unlike a few other programming languages, The C++ programming language doesn't allow a constructor to call another constructor of the same class. Luckily, this problem is about to disappear with the recent approval of a new C++0x feature called delegating constructors which are explained in this C++ tutorial.

    Special Report: The Definitive Guide to Windows Phone 7

    Microsoft looks to the future with Windows Phone 7, is it enough to catch up with the competition? Read along to learn how WP7 differs from past versions of Windows Mobile and how it matches up against its rivals.