- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7347 Articles for C++
477 Views
In this tutorial, we will be discussing a program to understand constructors in C++.Constructors are member functions of the classes which initiates the object instance creation. They have the same name as the parent class and don’t have any return type.Default constructorsExample Live Demo#include using namespace std; class construct { public: int a, b; //default constructor construct(){ a = 10; b = 20; } }; int main(){ construct c; cout
321 Views
In this article we will be discussing the working, syntax and examples of forward_list::clear() and forward_list::erase_after() functions in C++.What is a Forward_list in STL?Forward list are sequence containers that allow constant time insert and erase operations anywhere within the sequence. Forward lists are implemented as singly linked lists. The ordering is kept by the association to each element of a link to the next element in the sequence.What is forward_list::clear()?forward_list::clear() is an inbuilt function in C++ STL which is declared in header file. clear() is used when we have to remove all the elements of the forward list at ... Read More
3K+ Views
In this article we will be discussing the working, syntax and examples of list::push_front() and list::push_back() functions in C++ STL.What is a List in STL?List is a data structure that allows constant time insertion and deletion anywhere in sequence. Lists are implemented as doubly linked lists. Lists allow non-contiguous memory allocation. List performs better insertion extraction and moving of element in any position in container than array, vector and deque. In List the direct access to the element is slow and list is similar to forward_list, but forward list objects are single linked lists and they can only be iterated ... Read More
404 Views
In this article we will be discussing the working, syntax and examples of list::pop_front() and list::pop_back() functions in C++ STL.What is a List in STL?List is a data structure that allows constant time insertion and deletion anywhere in sequence. Lists are implemented as doubly linked lists. Lists allow non-contiguous memory allocation. List performs better insertion extraction and moving of element in any position in container than array, vector and deque. In List the direct access to the element is slow and list is similar to forward_list, but forward list objects are single linked lists and they can only be iterated ... Read More
3K+ Views
In this article we will be discussing the working, syntax and examples of list::front() and list::back() functions in C++ STL.What is a List in STL?List is a data structure that allows constant time insertion and deletion anywhere in sequence. Lists are implemented as doubly linked lists. Lists allow non-contiguous memory allocation. List performs better insertion extraction and moving of element in any position in container than array, vector and deque. In List the direct access to the element is slow and list is similar to forward_list, but forward list objects are single linked lists and they can only be iterated ... Read More
422 Views
In this article we will be discussing the working, syntax and examples of list::splice() function in C++ STL.What is a List in STL?List is a data structure that allows constant time insertion and deletion anywhere in sequence. Lists are implemented as doubly linked lists. Lists allow non-contiguous memory allocation. List performs better insertion extraction and moving of element in any position in container than array, vector and deque. In List the direct access to the element is slow and list is similar to forward_list, but forward list objects are single linked lists and they can only be iterated forwards.What is ... Read More
398 Views
In this article we will be discussing the working, syntax and examples of list::rbegin() and list::rend() functions in C++ STL.What is a List in STL?List is a data structure that allows constant time insertion and deletion anywhere in sequence. Lists are implemented as doubly linked lists. Lists allow non-contiguous memory allocation. List performs better insertion extraction and moving of element in any position in container than array, vector and deque. In List the direct access to the element is slow and list is like forward_list, but forward list objects are single linked lists and they can only be iterated forwards.What ... Read More
655 Views
In this article we will be discussing the working, syntax and examples of queue::swap() function in C++ STL.What is a queue in C++ STL?Queue is a simple sequence or data structure defined in the C++ STL which does insertion and deletion of the data in FIFO(First In First Out) fashion. The data in a queue is stored in continuous manner. The elements are inserted at the end and removed from the starting of the queue. In C++ STL there is already a predefined template of queue, which inserts and removes the data in the similar fashion of a queue.What is ... Read More
2K+ Views
In this article we will be discussing the working, syntax and examples of queue::push() and queue::pop() functions in C++ STL.What is a queue in C++ STL?Queue is a simple sequence or data structure defined in the C++ STL which does insertion and deletion of the data in FIFO(First In First Out) fashion. The data in a queue is stored in continuous manner. The elements are inserted at the end and removed from the starting of the queue. In C++ STL there is already a predefined template of queue, which inserts and removes the data in the similar fashion of a ... Read More
4K+ Views
In this article we will be discussing the working, syntax and examples of queue::empty() and queue::size() functions in C++ STL.What is a queue in C++ STL?Queue is a simple sequence or data structure defined in the C++ STL which does insertion and deletion of the data in FIFO(First In First Out) fashion. The data in a queue is stored in continuous manner. The elements are inserted at the end and removed from the starting of the queue. In C++ STL there is already a predefined template of queue, which inserts and removes the data in the similar fashion of a ... Read More