Recursion-all subsequences

https://ide.geeksforgeeks.org/OJNd1nP0gm
why is the code not working

To erase a character from string s, you need to use s.erase(0,1); and after that allsubseq(s,v,0); you did j + 1 here also but we know that string size is reduced by 1 and then we do not need to increase our j. Also this code won’t print the subsequences properly. Suppose we take n = 1 and put string s as “hello”.
The code with output :
hello
ello
llo
lo
o

It won’t print other subsequences like “hell”

i actually tried either taking or not taking an element in the new string.but now how should i approach the problem and changes to do