Sir this code is not giving me correct result

this recursive case is correct , but this not give me corrct result when i use vector and when i use string data type to store the result .

this is giving correct answer when i use char array to store the result