String Sequence recursion

This is my code for the problem it’s showing compilation error can someone help me??? and correct my code

hi @akshat42bajpai,
check the updated code https://ide.codingblocks.com/s/662332

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.

but why can’t we take string datatype instead of char for “output” variable??

@akshat42bajpai,
u r defining string out; (which is empty)
then u r doing out[index] which is not correct , so its better to define a char array of some size beforehand

okay thank you
for the help

@akshat42bajpai, :slight_smile: