Modern C++


Choosing Between Default Arguments and Overloading in C++

Decisions, decisions. Here's why overloading will keep you out of trouble.

Make Your Code Faster with noexcept

That noexcept keyword is tricky, but just know that if you use it, your coding world will spin faster.

How To Write a Function That Returns More Than One Value

Like magic, tuples make the impossible possible. Yep, we're talking here about one little corner in the Standard Template Library that will make it simple to return multiple values from a single function, without "out" parameters -- and it has other uses, too.

Using the not_null Template for Pointers That Must Never Be Null

Null pointer exceptions can get downright annoying, so who needs that?

Initialize Member Variables in the Order You Declare Them

In part 4 of this series on the C++ Core Guidelines, Kate Gregory reminds you of an oddity in C++ when it comes to initializing member variables, and shows you a best practice that will make sure this oddity never hurts you.

Choosing the Right Constructors to Write

In part 3 of this series on the C++ Core Guidelines, we explore constructors and why, rather than writing a default constructor, you should use in-class member initializers, a feature added in C++ 11.

Don't Cast Away Const

Too few C++ developers use const properly, or enough. A seemingly-strange guideline, suggesting you never use a particular language feature, leads to some insight about const and some good practices for you.

Introducing the C++ Core Guidelines

Whether you're new to C++ or a seasoned C++ coder, there are times when deciding how to do something seems arbitrary. The C++ Core Guidelines have been written to guide developers of all experience levels through some of the choices we make to help us write code that is fast, readable, maintainable, and sensible.

Compiler Basics How-To, Part 4: Improving the Parser

Now you have compiler fundamentals down pat, let's move on to some of the techniques you can use to improve the parser's design and performance.

Compiler Basics, Part 3: Syntax Analysis

Kenny Kerr continues his series about compiler fundamentals by introducing the syntax analysis, grammars, and the act of parsing or interpreting source code.

Compiler Basics, Part 2: Building the Scanner

Kenny Kerr continues his series about compiler fundamentals by considering how the original source code may be converted into a stream of tokens.

How To Write Your Own Compiler, Part 1: Mapping Source Files

Kenny Kerr starts his new series about compiler basics by looking at how to use memory-mapped files to read the original source code.

SQLite Queries and Primary Keys

Learn about SQLite database engine internals so you can simplify your code and improve the performance of your applications.

SQLite Performance and Prepared Statements

SQLite is a tremendously useful database for C++ developers. In this follow-up, Kenny Kerr shows various techniques for improving performance even further.

Using SQLite with Modern C++

Incorporate the free database library with these easy, step-by-step directions.

Long Filenames in Windows 8

Do you hate the 259-character filename limit in some Windows file systems? So does Kenny. Here's a way to eliminate it and free your application and users from the restriction.

Applying the Range-for Statement in C++

Want to iterate through a sequence with C++11? If so, the easiest way will be to use the range-for statement – Kenny Kerr shows you how.

An API for Simple HTTP Requests

Yes, sometimes you need sophisticated libraries that handle HTTP requests asynchronously, but in other situations that can be overkill. An old Internet Explorer API may have a solution.

Resource Management in the Windows API

The use of constructor/destructor pairs for resource management is the most important feature that distinguishes C++ from its predecessor.

Using the C++ Spell Checking API

Learn how to add spell checking to your applications.

Subscribe on YouTube