Doubt in the compilation error

please check my code and tell the reason for error

@Adhyayan,
Please share your code with me.

@Adhyayan.
I have corrected your code: https://ide.codingblocks.com/s/207913
There were errors in reverse method. I have commented the errors and corrected them, kindly have a look.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.