Trouble setting up the loops. (C++)

Array is a bad choice for your problem as it will take N*M comparisons(N in stdInput,M in fileInput). Better put in unordered map, then you can do

for (int i: fileInput)
     if i not in stdInput
        print i

Leave a Comment