Hello. I am trying to use constructor within constructor in the same class. Is that possible. I have tried something and it shows me a error message:

error: type ‘mainClass’ is not a direct base of ‘glavna’

This is the program I tried:
class mainClass
        int x,y;
        // constructors
        mainClass(int a, int b) {x=a; b=y;}
        mainClass():glavna(0,0) {}

        int getX() {return x;}
        int getY() {return y;}
Thank you!!!