We'll begin by creating a header file for our Camera class, so we'll create an empty header file in our project and add it to our target. We'll name it Camera.h. We'll only have a header because the methods that we're going to implement are very simple methods. But you can extract it into a separate CPP file if you want to. It is recommended that you try experimenting that way as well, because it will be a great way to learn. Let's begin coding our camera header. Follow these steps:
- First, let's get rid of the default code that is already present in the file. Then, add #pragma when the code is a simpler version. This doesn't work on all compilers, but most compilers will support this.
- Then, we'll add the ...