I want to solve this problem using strings ,have done it with character array,
in this code the output is just blanks please help me find out why.
I want to solve this problem using strings ,have done it with character array,
in this code the output is just blanks please help me find out why.
hi @dhruvprashar when dealing with strings, change the base case condition to “if i >= str.size()”
also you dont need to add “\0” character manually in strings.
https://ide.codingblocks.com/s/310301 here now I am unable to understand why every name in the list is able to enter the set .
hi @dhruvprashar
the main problem is this part
size of string is 0 initially. You cant access any random index. You have to append the character at the end of the string. You can do so like this -> out += ch