What would be the equivalent of this in C++ of the following snippet. I am in the process converting parts of an java application to C++.
Here is that java class snippet:
class container {
Public static final Object CONTAINER_FULL = new Object {
public boolean equals(Object other) {
// ...
}
String toString() {
// ...
}
// ...
}
// ...
}
The above class is wrapped in an java interface class "container". The call is ...
public Object fetch_the_object(int at_pos) {
if (at_pos == MAX) {
return container.CONTAINER_FULL;
}
// ...
}
What would be the closest equivalent in C++ of that static class and its call?