String Builder: Building Strings with Streams on the Stack
Discover how to build strings using streams, in one line, using only the stack as storage.
Discover how to build strings using streams, in one line, using only the stack as storage.
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.
Read along as Ovidiu presents the differences between 'class' and 'struct' in the C++ programming language.
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.
Learn about a classical arithmetic compression implementation (CACM) optimization.
Discover how to start and control a third party GUI application, particularly the Notepad text editor, from your own C++ applications.
Use your C++ Programming skills to create a special list control that allows a control to be inserted in a particular cell.
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.
Discover how to deal with C4996 warning, what secure CRT functions are and how to correctly use them.
This article describes how to create stack based allocators for use with STL containers.
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.
This article deals with advanced-level tips and tricks for using WinUnit, how to integrate WinUnit with Microsoft Visual Studio, and recommended guidelines.
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.
Learn to use the implementation of asynchronous Win32 sockets without the use of MFC.
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.
Learn to use CScreenImage, an MFC/ATL extension class for screen image captures.
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.
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.
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.
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.
This article serves as a brief introduction to the new API allowing users to create animations in MFC applications.
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.
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.
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.
Find out how to use nullptr to avert bugs and simplify the future maintenance of your C++ applications.
Learn how to use helper classes for interprocess communication with memory mapped files in C++ on Windows.
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.
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.
Learn how to build client applications that use SOAP based web services.
Learn how to set up the outline of an algorithm and leave the details of the implementation later using the Template Pattern.
This article presents a benchmark application which pits the red-black binary tree containers(map, set, etc) against hash containers.
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.
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.
Learn about MFC serialization and files version management in dialog applications.
MFC serialization and files version management in Multiple Document Interfaces applications (MDI)
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.
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.
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.
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.
Classify a point respect to a plane polygon that can be concave (i.e. with some angle grater than 180 degrees). Good performance, excellent stability.
The article introduces the simplex algorithm, provides a useful C++ function to optimize target function parameters, and shows rich examples, figures, flowcharts. source code is also attached with the article.
Botao Jia discusses the grammar of the C++ Pointer-to-Member Function, common applications and under-the-hood implementations.
Shell Links are a Windows feature that has been present since the very first 32-bit Windows release in 1995, and are the technology that the ubiquitous Windows shortcuts are built upon. Windows 7 Jump List tasks also use Shell links, creating renewed interest in using Shell links as a technique for interacting with applications.
Discover the new features in ASP.NET MVC 2.0 and how you can leverage them in your applications.
The Windows 7 Taskbar is one of the most noticeable and useful features of the new operating system, and MFC 10 introduces a number of enhancements that make it easy to integrate the Taskbar with your application.
This ASP.NET tutorial shows how to use the free Google Maps API to build a store locator ASP.NET application.
ASP.NET Developers, do you have ASP.NET pages that are slow to respond to the user and/or timeout. Try this technique to move those processes to the background and provide feedback to the user.
ISOC C++ standards committee moves one step closers to the completion of the C++0x standard.
The article discusses the new capabilities of the C++ programming language described in the standard C++0x and supported in Microsoft Visual Studio 2010. By the example of PVS-Studio, we will see how the changes in the language influence static code analysis tools.
Developers rejoice, the C++0x standard has changed the rules of initialization to allow you to initiate almost any object.