Apperently this function only overwrites my array,giving a memory leak(which i dont detect)
the // line is the one i added now,woundering if thats it to complete my code?
Hope someone can point me in the right direction,thanks in advance;)
Yes, except that you have the order wrong.
Explicitly writing this-> is unnecessary, by the way.
You should also break out of the loop as soon as you have found the item you want to delete.
If there can be more than one, you need to decrement i before the next iteration, or else you might miss some matching elements.