C/C++ : Creating a Custom Class
There are two methods for creating a class in a C++ project. The first method is to code your class directly in the project code in which you will be using the class. However, if you take that route, you cannot reuse that code later (say, for an entirely different project) without opening the first project, copying the code, and pasting it into your new project. The second method involves creating a discrete class project, separate from any program code, and then "including" the class in your program code. I try to always use the second method, for the very simple fact that if I create a class I find useful, I can use it again and again.