#include <iostream>
 
class XX
{
public:
    XX() {
        std::cout<<"C XX\n";
        if (++instCount > 4) {
            throw "Fuck you, I'm not gonna create more than 4 instances";
        }
    }
//private:
    ~XX() {
        std::cout<<"~ XX\n";
        instCount--;
    }
    
private:
    static int instCount;
};
 
int XX::instCount = 0;
 
int main() {
    XX *xx = NULL;
    try
    {
        xx=new XX[10];   // compile error (1)
    }
    catch(...)
    {
        std::cout << "Oops" << std::endl;
    }
 
    return xx ? 0 : 1;
}