Is there any method in c++ to find the multiple position of a char in a string.
eg : Hi, How are you?
position of H : 1 and 5
I want to pass a string over the network, After Coding and Decoding How will i make sure that this is the same string ?
Enter character: r
Enter string: programming
Output: Positions of 'r' in programming are: 2 5
Character 'r' occurred for 2 times