#include <iostream>

class Example {
    private:
        int a;
        // lots of important variables that live on the heap
    public:
        int getA() { return a; }
        
        // Example() = default;
        Example() {
        	std::cout << "default constructor" << std::endl;
        	a = 0;
        }
        
        Example(int a_local) {
            a = a_local;
            std::cout << "custom constructor" << std::endl;
            /* allocating memory, etc. ... */
        }
};

int main() {
	std::cout << "Running default constructor" << std::endl;
	Example e1;
	std::cout << "e1.a is " << e1.getA() << std::endl;
	
	std::cout << "Running custom constructor" << std::endl;
	Example e2(500);
	std::cout << "e2.a is " << e2.getA() << std::endl;
}