I need help in writing a fuction call delete_repeats that has a partially filled array of chararcters as a formal parameter and that delets all repeted letters from the array. It should also have two formal parameters: an array parameter and a formal parameter of type int that gives the number of array position used and when the letters are deleted the remaining letters are moved forward to fill in the gap. So far this is what I have :
const max=30;
char used [max];
cout<<"Type in a word";
cin>>word;
for (int i=0;i<size-1; i++)
for (int j=i+1; j<size; j++)
if (word[i]==word[j])
delete_repeat( )
void delet_repeat(char w[ ],int size)
{
for (s=j;s<size-1;s++)
{
word[s]=word[s+1]
}
im very lost in this :?: