How would i go about subtracting elements from 2 arrays?
I have my array_1[5] array with elements {1, 2, 3, 4, 5} and array_2[3] with elements {2, 3, 5}. In math class i was thought that i only need to subtract the groups to be left with {1, 4}. I have tried subtracting the arrays like integers but i can't figure out how to properly use the index. I have also tried sorting and the second array and then checking if their indexes are equal but that doesn't work.
How can i get this done in C++ ?
 
    