if i entered 10 characters and i want the program to cout a certain character in the string and beside it all its orders in the string.
for example:
The result for orders of character 'a' in the string (banana);
a=2 ; // b=1, (a=2)
a=4 ; //b=1, a=2 , n=3 , (a=4)
a=6 ; //b=1, a=2 , n=3 , a=4 , n=5 ,(a=6)
what if i wanted to input a 5000 characters , should i write:
char first = name[0];
char second = name[1];
char third = name[2];
....................
// till let's say 3000????
this wouldn't be helpful !
the code didn't give me the desired result.
i don't want to put character by character , i want to put the character one time
and the program outputs the whole character orders in the string.
thanks for your help anyway :)