fork download
  1. // C++ program to demonstrate working of insert()
  2. #include<bits/stdc++.h>
  3. #include<string>
  4. using namespace std;
  5. int main()
  6. {
  7.  
  8. unordered_set<int> us;
  9.  
  10. us.insert(23);
  11. us.insert(45);
  12. us.insert(50);
  13.  
  14. unordered_set<int>::iterator i;
  15.  
  16. for(i=us.begin();i!=us.end();i++)
  17. cout<<"\t"<<*i;
  18.  
  19. if(us.find(50)!=us.end())
  20. {
  21. cout<<"\n\n\n oh bhai bhai bhai ";
  22. }
  23. else
  24. cout<<"\n Nahi hai bhai";
  25.  
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 4552KB
stdin
Standard input is empty
stdout
	23	50	45


 oh bhai bhai bhai