In our previous blog: Space Aliens and C++ programming and inline classes , we used an inline class to keep track of the many space aliens that live in the new dimension that you have found yourself in.
Now what we want to do is use the inline class in a header file, this is simple to do. Unlike taking a header on a skateboard, it is painless.
In the Program you wrote in the Space Aliens and C++ programming and inline classes add a header file in the header file folder if you used the default console app, select Add-New Item then Header file, which should come up by default. Give the header file the same name as your source (cpp) file, as a matter of discipline and not dogma. (Keep in mind that my karma just ran over your dogma.)
Now select the “inline” class in your source file and put it the header file you just created, so your header file should look like the following (FYI: this is an image):
Your source file will need a reference to the new header file and should look similar to the following: