[Solved] Deleting word from file evertime user enters a word to delete and writing the new array to a new file. C++


string space = " ";
int locate = -1;
for (int j = 0; j < dictionarySize; j++)
    {
        if (space == d_newDictionaryArray[j])
       {
            locate=j;
            break;
        }
    }
//to locate where the element with space is stored
if(locate!=-1)
for (int i = locate; i <  dictionarySize-1; i++)
    {
        d_newDictionaryArray[i] = d_newDictionaryArray[i+1];
    }
//to shift all the elements after the space to adjacent previous position

1

solved Deleting word from file evertime user enters a word to delete and writing the new array to a new file. C++