First programming assignment for algorithms (c++, VS): quick union