Remove duplicates in c++


i was getting an error

You are using a wrong approach in your code . Try using another approach in your code.