Jeff Cogswell

Jeff Cogswell has been an application developer and trainer for 18 years, working with clients from startups to Fortune 500 companies. He has developed courses on C++ and other technologies.

Articles & Books From Jeff Cogswell

Step by Step / Updated 06-27-2016
Creating a library project in C++ is only a little different than creating a console application. The following steps describe how to create a library project:Choose File→New→Project.You see the New From Template dialog box shown. Highlight the Static Library icon on the Projects tab, then click Go.You see the Welcome page of the Static Library wizard.
Step by Step / Updated 06-27-2016
The static library starts with a standard C file. To make this library work well with templates, you need to delete the C file, add a C++ file, and add a header file. The following steps describe how to perform this process:Right-click main.c in the Projects tab of the Management window and choose Remove File From Project from the context menu that appears.
Step by Step / Updated 06-27-2016
Most of the Boost library works just fine by adding headers to your application code. However, a few components, such as RegEx, require a library. Before you can use a library, you must build it. After you build the library, you must add it to your application.There are two techniques for adding the required headers and libraries to an application.
Article / Updated 03-09-2017
Every time you start a new application, you create one or more processes. A process is simply executable code that is loaded into memory. The CPU reads and executes the instructions to perform the tasks you ask the application to do. When the CPU loads your application into memory, it assigns each process the application creates a Process IDentifier (PID), which is pronounced pid (think of lid with a p instead of an l).
Article / Updated 03-26-2016
When you create an application, you write your code in various source code files. For one application, you can have many different source code files. Some large corporate projects may have hundreds (or even thousands) of source code files with dozens of programmers working on the different files. As you can imagine, dozens of strong-willed programmers working together makes for quite an adventure; but by using tools like make, these programmers are able to easily work together.
Article / Updated 03-26-2016
With a math template, you usually need access to a wealth of calculations but may only use one or two of those calculations at a time. For example, if someone is calculating your mortgage, he or she doesn’t need to know the amortization calculation. However, the person might need the amortization calculation when working with the next customer.
Article / Updated 03-26-2016
Remembering a bunch of C++ syntax can make you "loopy." The following samples show the syntax of some of the more easily forgotten C++ situations: a for loop, a while loop, and a switch statement; a class and the code for a member function; a base class and a derived class; a function, function pointer type, and pointer to the function; and a class template and then a class based on the template.
Article / Updated 03-26-2016
In C++, a header file holds forward declarations of identifiers. Here are some of the most common C++ header files that you’ll be using, along with their correct spellings. These aren’t by any means all of them, but they are the most common: Include if you’re going to be using the string class. Include when you want to use cout and cin.
Article / Updated 03-26-2016
Although many C++ programmers take measures to prevent bugs, mistakes still slip through. This list of the ten most common mistakes while writing C++ code can help both new and veteran programmers: You forgot to declare the variable. You used the wrong uppercase and lowercase letters; for example, you typed Main when you meant main.
Article / Updated 03-26-2016
Many C++ newbies want to create the projects they find in books by typing in the code they come across to better see how the process works. However, sometimes just getting the project started can be a serious problem. You may find step-by-step instructions online that provide you with techniques you can use to create the projects, but often, these procedures build on what you've done before.