Passionate_Coder's blog

By Passionate_Coder, history, 6 weeks ago, In English

I have extracted each character of my name (T a s p i y a this way). I want to insert each character in a set so that the set doesn't contain any duplicate characters. So how can I do that?

I need implementation.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it
set<char>st;
for(auto it:v){   // v is the vector which contains all your characters
    st.insert(it);
}