In the .h file, you have a class definition where you write member variables en-member functions (usually a prototype)
In the .cpp file, you declare the body of the methods. Example:
rectangle.h:
class rectangle { public:
rectangle.cpp:
#include "rectangle.h"
But, like gmannickg , you should read a book about C ++ or a real tutorial that will explain to you how the syntax works. And object oriented programming (if you are not familiar with it)
source share