Quote:
Originally Posted by nadavsen2
i didnt put those lines
#ifndef CAMERA_H
#define CAMERA_H
and the #endif..
what is this macro? or its not macro?
|
It's called a header guard. You can read about it
here or
here
Quote:
why in the OperatorControl you access you class by typing
Camera c();
and not
Camera *c;
c = new Camera();
|
In the end both of those do the same thing, instantiate a Camera called c. Which one you use depends on how you plan to use it. If you're only using it in that location and you don't need to pass it around, you can use the non-pointer version. If you plan to be passing the object around, or it is an attribute of a class you'll want to use the pointer approach.