#include <iostream>
using namespace std;
class Txtbin {
public:
    const static int ERR_EMPTY_IMAGE   = 2;   
};
class Test1 {
public:
    const  int ERR_EMPTY_IMAGE   = 2; 
    Test1() = default; 
    Test1(int x) : ERR_EMPTY_IMAGE{x} {}
};
class Test2 {
public:
    const  int ERR_EMPTY_IMAGE;    
    Test2(int x) : ERR_EMPTY_IMAGE{x} {}
};

int main() {
	Txtbin a;
    int err; 
    Test1 b;  
    Test1 b_ouch(9); 
    Test2 c(5), d(6); 
    
    switch(err){
        case Txtbin::ERR_EMPTY_IMAGE:      // no need for an object
            std::cerr << "Error: Image is empty\n" << std::endl;
            break;
    }	
    switch(err){
        case a.ERR_EMPTY_IMAGE:            // but the object doesn't bother
            std::cerr << "Error: Image is empty\n" << std::endl;
            break;
    }	
    
    cout << "Sizeof a: "<< sizeof(a) <<endl;  // only static but minimum size is 1. 
    cout << "Sizeof b: "<< sizeof(b) <<endl;  // with non static const 
    cout << "Test2 c ->"<< c.ERR_EMPTY_IMAGE<<" d->"<< d.ERR_EMPTY_IMAGE<<endl; 
    cout << "Test1 b ->"<< b.ERR_EMPTY_IMAGE<<" b_ouch->"<< b_ouch.ERR_EMPTY_IMAGE<<endl; 
   
	return 0;
}