Prevent enter duplicate element to a vector | Sololearn: Learn to code for FREE!

+1

Prevent enter duplicate element to a vector

Can anyone tell me how to make sure that it is not duplicated before entering an element into a vector?

11/7/2019 3:29:19 PM

Maryam

7 Answers

New Answer

+1

Its C++

+1

Its C++

+1

Ok thanks so much

+1

I dont understand you

0

Maryam What is your language preference?

0

Maryam Someone will surely get back to you. If it was Java then I could have helped.

0

Look up unique in the algorithm header file, u need to sort the vector first, also in the same header file.