And what exactly is the problem? Although from just glancing I think you should remove #include<stdio.h> as you already are using the iostream library also remove your #define ... and use const int instead its better practise for C++.