Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.5K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
C++
4.3K+ articles
Difference Between
3.6K+ articles
C++ Programs
2.4K+ articles
STL
1.3K+ articles
CPP-Functions
615+ articles
cpp-vector
375+ articles
CPP-Library
254+ articles
cpp-iterator
55 posts
Recent Articles
Popular Articles
How to Iterate Through a Vector in C++?
Last Updated: 15 November 2024
Iterating or traversing a vector means accessing each element of the vector sequentially. In this article, we will learn different methods to iterate over a vector in C++....
read more
STL
cpp-vector
C++
cpp-iterator
C++ Programs
CPP Examples
Iterators Operations in C++
Last Updated: 01 October 2024
Iterators are pointer like objects that are used to refer iterator the STL containers. Just like pointer arithmetic, there are some operations that are allowed on iterator...
read more
STL
C++
cpp-iterator
string::rbegin() and string::rend() in C++
Last Updated: 25 September 2024
The std::string::rbegin() and std::string::rend() functions in C++ are used to fetch the reverse iterators to the string. They are the member function of std::string and a...
read more
STL
cpp-string
C++
cpp-iterator
Iteration Over std::vector: Unsigned vs Signed Index Variable
Last Updated: 02 August 2024
When we iterate over a std::vector in C++, we need to choose the right type for the index variable to maintain both the correctness and clarity of our code. A common quest...
read more
STL
cpp-vector
C++
cpp-iterator
Picked
Why are Standard Iterator Ranges [begin, end) Instead of [begin, end]?
Last Updated: 01 August 2024
In C++, the Standard Template Library (STL) uses a half-open range convention [begin, end) for iterator ranges. This means the range includes the begin iterator but exclud...
read more
STL
C++
cpp-iterator
Picked
Why Use Iterators Instead of Array Indices?
Last Updated: 25 July 2024
In C++, both iterators and array indices are used to access and manipulate elements in a container, such as arrays, vectors, and lists. However, one common question that a...
read more
STL
cpp-array
C++
cpp-iterator
Picked
How to Implement Iterator for a Doubly Linked List in C++?
Last Updated: 08 July 2024
In C++, iterators are used to access elements of a container sequentially without exposing the underlying representation. When working with data structures like a doubly l...
read more
C++
cpp-iterator
C++ Programs
Picked
CPP Examples
How to Traverse Vector using const_iterator in C++?
Last Updated: 03 April 2024
In C++, a const_iterator is a type of iterator that points to constant content means by using a const_iterator, we can read from but cannot write to the element it points ...
read more
STL
cpp-vector
C++
cpp-iterator
C++ Programs
Picked
CPP Examples
How to Find Last Occurrence of an Element in a Deque in C++?
Last Updated: 02 April 2024
In C++, deques also known as double-ended queues are sequence containers that allow the users to insert and delete elements from both ends efficiently. In this article, we...
read more
STL
C++
cpp-iterator
C++ Programs
cpp-deque
Picked
CPP Examples
How to Traverse a List with const_iterator in C++?
Last Updated: 26 March 2024
In C++, a list is a container used to store data in non-contiguous memory locations. It also provides a constant iterator that provides the constant reference to its eleme...
read more
STL
C++
cpp-iterator
C++ Programs
cpp-list
Picked
CPP Examples
How to Traverse a List with reverse_iterator in C++?
Last Updated: 22 March 2024
In C++, lists arecontainers that allow users to store data in non-contiguous memory locations.List provides reverse iterators that make it easy to traverse the list in rev...
read more
C++
cpp-iterator
C++ Programs
cpp-list
Picked
CPP Examples
How to Access First Element in a Vector Using Iterator in C++?
Last Updated: 18 March 2024
In C++, vectors are containers similar to arrays but unlike arrays, vectors can resize themselves during the runtime. These vectors provide iterators to access their eleme...
read more
STL
cpp-vector
C++
cpp-iterator
C++ Programs
Picked
CPP Examples
How to Traverse Vector Using const_reverse_iterator in C++?
Last Updated: 05 March 2024
In C++, a vector can be traversed in reverse order using a const_reverse_iterator. A const_reverse_iterator is a type of iterator that points to the last element in the co...
read more
STL
cpp-vector
C++
cpp-iterator
C++ Programs
Picked
CPP Examples
How to Use const_iterator with a Map in C++?
Last Updated: 29 February 2024
In C++, a const_iterator is a type of iterator that points to constant content. This means that using a const_iterator, you can read from but not write to the element it p...
read more
STL
C++
cpp-iterator
C++ Programs
cpp-map
Picked
CPP Examples
How to Use a reverse_Iterator with a Map in C++?
Last Updated: 29 February 2024
In C++, a reverse_iterator is a type of iterator that points to elements in a container in the reverse order. This means that using a reverse_iterator, you can traverse a ...
read more
STL
C++
cpp-iterator
C++ Programs
cpp-map
Picked
CPP Examples
1
2
3
4
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !