Hi, i'm new to C++ and OOP, so I have a theorical question.
I have a class that will be used only once in the entire program. This means I will instantiate only one object from this class. So my question is:
Is it necessary to create that object? Or to put it another way:
Is it right to make a class that has only static methods and static properties?
I mean, I will never create an object. I'll use the class with static methods and static properties. For example:
1 2 3 4 5 6 7
class A
{
staticbool error;
staticbool getError(void);
staticvoid setError(bool);
....
};
Then to use:
if ( A::getError() ) .... ;
I hope I could express my question properly. Sorry for my English. Thanks.