×

C++ STL Tutorial

C++ STL Algorithm

C++ STL Arrays

C++ STL String

C++ STL List

C++ STL Stack

C++ STL Set

C++ STL Queue

C++ STL Vector

C++ STL Map

C++ STL Multimap

C++ STL MISC.

C++ STL (Standard Template Library)

This page contains articles, tutorials, function, programs/examples in C++ STL (Standard Template Library).

Latest Articles, Tutorials, Examples on C++ STL

The STL (Standard Template Library) in C ++ is the collection of different algorithms and class templates. STL allows a programmer to implement the basic predefined data structures easily and effectively. STL basically provide us the data structure like stacks, lists and queues. Standard template library also allows a programmer to implement many algorithms directly using predefined functions.

C++ STL Basics

  1. Introduction to C++ STL (Standard Template Library)
  2. Range-based loop in C++ (similar to for-each loop)
  3. std::pair, std::tuple to return multiple values from a function
  4. std::nth_element() in C++
  5. Finding Median of an unsorted array in Linear Time using C++ standard library function
  6. std::valarray class in C++
  7. unordered_map in C++

C++ STL Algorithm header functions

  1. std::max() function with example in C++ STL
  2. std::min() function with example in C++ STL
  3. std::minmax() function with example in C++ STL
  4. std::min_element() function with example in C++ STL
  5. std::max_element() function with example in C++ STL
  6. std::copy() function with example in C++ STL
  7. std::copy_n() function with example in C++ STL
  8. std::copy_if() function with example in C++ STL
  9. std::count() function with example in C++ STL
  10. std::fill() function with example in C++ STL
  11. std::fill_n() function with example in C++ STL
  12. std::replace() function with example in C++ STL
  13. std::replace_if() function with example in C++ STL
  14. std::replace_copy() function with example in C++ STL
  15. std::replace_copy_if() function with example in C++ STL
  16. std::rotate() function with example in C++ STL
  17. std::rotate_copy() function with example in C++ STL
  18. std::accumulate() function with example in C++ STL
  19. Shuffling an array using C++ STL function
  20. std::binary_search() with examples in C++
  21. std::equal() with examples in C++
  22. std::for_each() with examples in C++
  23. std::find() with examples in C++
  24. std::find_first_of() with examples in C++
  25. std::includes() function with example in C++
  26. std::next_permutation() function with example in C++ STL
  27. std::lower_bound() function with example in C++ STL
  28. std::upper_bound() function with example in C++ STL
  29. std::swap_ranges() function with example in C++

C++ STL Utility header functions

  1. std::swap() function with example in C++ STL

C++ STL Arrays

  1. Array in C++ Standard Template Library (STL) with its common functions
  2. array::operator[] with Example in C++ STL
  3. array::front() function with Example in C++ STL
  4. array::back() function with Example in C++ STL
  5. array::begin() and array::end() functions with Example in C++ STL
  6. array::rbegin() and array::rend() functions with Example in C++ STL
  7. array::fill() function with Example in C++ STL
  8. array::size() function with Example in C++ STL
  9. array::max_size() function with Example in C++ STL
  10. array::empty() in C++ STL with Example
  11. array::get function template with Example in C++ STL
  12. Sort an array in ascending order using sort() function in C++ STL
  13. Sort an array in descending order using sort() function in C++ STL
  14. C++ program to find the integers which come odd number of times in an array
  15. C++ STL sort function to sort an array or vector
  16. How to get the first and last elements of an array in C++ STL?

C++ STL String

  1. std::string in C++ STL (Standard Template Library)
  2. String Assignment | C++ STL
  3. string::assign() Function with Example in C++ STL
  4. string::length() Function with Example in C++ STL
  5. Convert numeric to string using string::to_string() in C++ STL
  6. Appending text to the string using string::append() function in C++ STL
  7. Create substring by given start, end index of a string | C ++ STL
  8. Compare two string objects in C++ | C++ STL
  9. How to convert a character to string in C++ STL?
  10. How to convert an integer to string in C++ STL?
  11. More...

C++ STL List

  1. List functions in C++ STL (Standard Template Library)
  2. Assign the elements to the list (different methods) - Example of list::assign() | C++ STL
  3. std::list::empty() function in C++ STL
  4. Iterate a list (Example of list::begin() and list::end() functions) | C++ STL
  5. Iterate a list in reverse order (Example of list::rbegin() and list::rend() functions) | C++ STL
  6. Input and add elements to a list | C++ STL
  7. Get the first and last element of the list | C++ STL
  8. Insert the element at beginning and end of the list | C++ STL
  9. Remove all occurrences of an element and remove set of some specific from the list | C++ STL
  10. Examples of list.remove_if() function | C++ STL
  11. Remove all consecutive duplicate elements from the list | C++ STL
  12. Merge two lists using merge() function | C++ STL
  13. Creating a list by assigning the all elements of another list | C++ STL
  14. Assign a list with array elements | C++ STL
  15. Push characters in a list and print them separated by space in C++ STL
  16. Access elements of a characters list using const_iterator in C++ STL

C++ STL Stack

  1. Stack in C++ STL (Standard Template Library)
  2. stack::push() function in C++ STL
  3. stack::pop() function in C++ STL
  4. stack::top() function in C++ STL
  5. stack::size() function in C++ STL
  6. stack::empty() function in C++ STL
  7. Stack program using C++ Standard Template Library (STL)

C++ STL Set

  1. Set in C++ STL (Standard Template Library)
  2. set::size() function in C++ STL
  3. set::insert() function in C++ STL
  4. set::erase() function in C++ STL
  5. set::empty() function in C++ STL
  6. set::emplace() function in C++ STL
  7. set::clear() function in C++ STL
  8. set::lower_bound() function in C++ STL
  9. set::upper_bound() function in C++ STL
  10. set::find() function in C++ STL
  11. Converting String into Set in C++ STL

C++ STL Queue

  1. Queue in C++ Standard Template Library (STL)
  2. Print all elements of a queue in C++ STL
  3. queue::front() and queue::back() in C++ STL
  4. queue::push() and queue::pop() in C++ STL
  5. queue::empty() and queue::size() in C++ STL
  6. Check if a queue is empty or not using queue::size() function

C++ STL Deque

  1. Push and print elements in an integer deque in C++ STL

C++ STL Vector

  1. Vectors in C++ Standard Template Library (STL)
  2. Declare, Initialize and Access a Vector | C++ STL
  3. Initialize a vector in C++ in different ways
  4. Initialize 2D vector in C++ in different ways
  5. Passing vector to a function in C++
  6. Sort a 2D vector in C++
  7. Printing all elements of a vector using vector::begin() and vector::end() functions in C++ STL
  8. Printing all elements in reverse order of a vector using vector::begin() and vector::end() functions in C++ STL
  9. Create an empty vector and initialize by pushing values in C++ STL
  10. Create a vector by specifying the size and initialize elements with a default value in C++ STL
  11. Create a vector and initialize it like an array in C++ STL
  12. Create a vector and initialize it from an array in C++ STL
  13. Create a vector and initialize it from another vector in C++ STL
  14. Create and initialize a vector using different ways in C++ STL
  15. Access vector elements using for each loop in C++ STL
  16. Different ways to access elements from a Vector in C++ STL
  17. Push and print elements in an integer vector in C++ STL
  18. Push and print elements in a float vector in C++ STL
  19. Check vector is empty or not | C++ STL
  20. Copy a vector to another in C++
  21. Copy a vector to another by using vector.assign() function in C++
  22. Erase elements in C++ Vector using vector::erase()
  23. Find largest and smallest elements in a vector | C++ STL
  24. Insert elements in vector using vector::insert() | C++ STL
  25. C++ STL sort function to sort an array or vector
  26. Appending a vector to a vector in C++ STL
  27. Difference between size and capacity of a vector in C++ STL
  28. Minimum and maximum elements of a vector in C++ STL
  29. How to find the maximum/largest element of a vector in C++ STL?
  30. How to find the minimum/smallest element of a vector in C++ STL?
  31. How to reverse vector elements in C++ STL?
  32. How to find the sum of elements of a vector in C++ STL?
  33. How to join two vectors in C++ STL?
  34. How to find common elements between two Vectors using in C++ STL?
  35. How to copy array elements to a vector in C++ STL?
  36. Changing a particular element of a vector in C++ STL
  37. 2D vector in C++ STL with user defined size
  38. How to check whether an element exists in a vector in C++ STL?
  39. Different ways to copy a vector in C++
  40. Vector Functions

C++ STL Map

  1. Map in C++ | C++ STL
  2. map::size() function in C++ STL with Example
  3. map::max_size() function with Example in C++ STL
  4. map::empty() function with Example in C++ STL
  5. Insert elements in map | C++ STL
  6. Delete elements from a Map | C++ STL
  7. C++ program to print all the Repeated Numbers with Frequency in an Array
  8. C++ program to print all the Non-repeated Numbers in an Array
  9. C++ STL | Sort a map based on values instead of keys

C++ STL Multimap

  1. Multimap in C++ STL
  2. Multimap insert(), erase() in C++ STL
  3. Multimap find(), lower_bound(), upper_bound() in C++ STL

C++ STL Priority Queue

  1. C++ STL | User-defined comparator for priority queue

C++ STL Heap

  1. Create Heap by using make_heap() | C++ STL

C++ STL MISC.

  1. Binary Search in C++ using Standard Template Library (STL) function binary_search()
 
 

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.