I was just wondering whether we can have static classes in C++. What I mean is can we declare a class as static in C++ like static class foo? I know we can have static member variables and static member functions in C++ but I am not sure about static classes.
Edit:
I intended to ask what does it mean for a class to be static.
The static keyword implies that the object that it refers to exists through the life of the entire program. A class definition is just an outline for constructing an object.
With that in mind, perhaps you might be looking to do something like create a namespace or create a singleton object, a class that is designed to only ever have a single instance.