stl 404

  1. push_back vs emplace_back
  2. Appending a vector to a vector
  3. Concatenating two std::vectors
  4. Iteration over std::vector: unsigned vs signed index variable
  5. How do I erase an element from std::vector<> by index?


  6. What's the difference between “STL” and “C++ Standard Library”?
  7. std::string formatting like sprintf
  8. Why does the C++ STL not provide any “tree” containers?
  9. How to find if a given key exists in a C++ std::map
  10. Why can't I make a vector of references?
  11. Sorting a vector in descending order
  12. How to check that an element is in a std::set?
  13. What's the most efficient way to erase duplicates and sort a vector?
  14. Why use iterators instead of array indices?
  15. Is std::unique_ptr<T> required to know the full definition of T?
  16. Why is it wrong to use std::auto_ptr<> with standard containers?
  17. Why is the C++ STL is so heavily based on templates? (and not on *interfaces*)
  18. Is std::vector so much slower than plain arrays?
  19. Throwing the fattest people off of an overloaded airplane.
  20. Sorting a vector of custom objects
  21. How do I print the elements of a C++ vector in GDB?
  22. Why are Standard iterator ranges [begin, end) instead of [begin, end]?
  23. C++ Erase vector element by value rather than by position?
  24. In STL maps, is it better to use map::insert than []?
  25. Why does std::list::reverse have O(n) complexity?
  26. Best way to extract a subvector from a vector?
  27. std::string length() and size() member functions
  28. Determine if map contains a value for a key?
  29. Remove spaces from std::string in C++
  30. How to retrieve all keys (or values) from a std::map and put them into a vector?
  31. vector vs. list in STL
  32. How to sum up elements of a C++ vector?
  33. C++ STL Vectors: Get iterator from index?
  34. STL or Qt containers?
  35. Why use non-member begin and end functions in C++11?
  36. How to convert wstring into string?
  37. C++ sorting and keeping track of indexes
  38. Thou shalt not inherit from std::vector
  39. In which scenario do I use a particular STL container?
  40. Should I store entire objects, or pointers to objects in containers?
  41. Why can I not push_back a unique_ptr into a vector?
  42. C++ valarray vs. vector
  43. Why is std::map implemented as a red-black tree?
  44. Advantages of std::for_each over for loop
  45. How do I clear the std::queue efficiently?
  46. maximum value of int
  47. What really is a deque in STL?
  48. How to initialize std::vector from C-style array?
  49. What happens if you call erase() on a map element while iterating from begin to end?
  50. How to get std::vector pointer to the raw data?