My code is not printing anything

my code is not printing anything

sorry i missed your doubt

Your mistake
don’t increase pos like this
genarate_strings(input.substr(1),output,pos++);
here pos will increase after function call complete because it is post increament

never ever pass arguments like this

use this
genarate_strings(input.substr(1),output,pos+1);

Modified Code