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

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).
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.
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
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.
Article / Updated 03-26-2016
Click here to download the code example files for C++ All-in-One For Dummies, 3rd Edition. These files contain all the sample code from the book. Use them to work through all the C++ sample applications describe in our book. During the writing of this book, a few of our beta readers reported some odd behavior from their anti-virus programs.
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
When an application is running, the functions in the application exist in the memory; so just like anything else in memory, they have an address. And having an address is good, because that way, people can find you. You can take the address of a function by taking the name of it and putting the address-of operator (&) in front of the function name, like this: address = &MyFunction; But to make this work, you need to know what type to declare address.
Article / Updated 03-26-2016
This following file has a general format (or protocol!). The text is easy because it can only be interpreted in one way — as text. Sooner or later, you may be reading a file that has this kind of information in it: Hello there my favorite number is 13. When I go to the store I buy 52 items each week, except on dates that start with 2, in which case I buy 53 items.
Article / Updated 03-26-2016
There's a quick-and-dirty way you can copy a file, and you can use this to also move, delete, and rename files. However, this method is absolutely not portable: in effect, if you do this on Windows, for example, you won't be able to run the same application on Unix, and vice versa. That is, you have to make a version for the operating system you're using.
Article / Updated 03-26-2016
The name of the array is a pointer to the array itself. The array is a sequence of variables stored in memory. The array name points to the first item. This is an interesting question about pointers: Can you have a function header, such as the following line, and just use sizeof to determine how many elements are in the array?