i made this program as i was tring to figure out a way to print out the vector from int main but i had to chage the return value to be the actual vector which caused a problem because i am trying to make the substrings print out recursively and i originally had
return store_all_substrings(s.subtr(1))
but as i was changing some things it actually works now but the problem is i dont know why. it seems like it should only print out a few but it somehow repeats itself and i dont really know if it is doing it recusively. the code is as follows: