Software Engineering Map vs Multimap in C++ STL The only difference between map and multimap in C++ is that map can only store unique key-value pairs while is multimap, no key value pair is unique.
Software Engineering equal_range() in Set C++ STL equal_range() is a built in function for Set container in C++ STL which is used to determine the range of a number or key value passed as a parameter.
Software Engineering Bucket in Unordered map in C++ STL unordered_map::bucket for unordered map container in C++ STL is used to check if 2 elements have the same hash and hence, falls into the same bucket.
Software Engineering Relational Operators for comparing Queue in C++ STL Relational Operators used with queue c++ STL are overloaded operators which are used to perform appropriate comparisons between two queue objects. The queues are compared element by element.
Software Engineering Swap two sets (set::swap) in C++ STL In this article, we will take a look into swapping two set containers in C++ Standard Template Library using swap method.
Software Engineering gets() vs fgets() in C and C++ gets() and fgets() are functions in C language to take input of string with spaces in between characters. gets suffer from buffer overflow which is solved by fgets
Software Engineering Different ways to remove elements from vector in C++ STL In this article, we will go through multiple ways to delete elements from a vector container in C++ STL like pop_back, pop_front, erase, clear, remove and more
Software Engineering #if directive in C / C++ #if is a preprocessor directive in C to define conditional compilation. It can be used just like an if condition statement which impacts the compilation process
Software Engineering emplace_hint() in Set C++ STL emplace_hint() is a method of Set container in C++ STL to insert unique elements in a set at a desired position while maintaining the ascending order property of the set.
Software Engineering emplace() in Set C++ STL Emplace is a function of set container in C++ STL which is used to insert elements in the set. It is considered to be a faster alternative to insert().
Software Engineering Different ways to initialize unordered_map in C++ In this article, we are going to learn about Unordered_map in C++ and specifically how to initialize them in our code in 4 different ways.
Software Engineering Swapping a queue in C++ STL In this article, we will explore examples of swapping queues. We can swap a queue in C++ STL in two ways using std::queue::swap and using std::swap.
Software Engineering Getting started with 2D graphics in C++ (SDL2) We will start by implementing a basic class design which initialize various parameters of SDL with a clear black window. From there, we will implement drawing different shapes and then we will create a simple animation
Software Engineering Different ways to copy a vector in C++ In this article, we will explore different methods to copy a vector in C++ and all covered methods use deep copy that the memory address of new copy is different from the original vector.
Software Engineering set::rbegin() and set::rend() in C++ STL In this article, we will explore the rbegin and rend function of set container in C++ STL and use examples to demonstrate different use cases like reverse traversal
Software Engineering set::begin and set::end in C++ STL In this article, we will explore the begin and end function of set container in C++ STL and use examples to demonstrate different use cases.
Software Engineering Type Casting in C++ Learn about type casting in C++ where data types can be converted automatically by compiler, explicitly converted by user and by using the cast operator.
Software Engineering Fundamental Data Types in C++ In C++, there are 6 fundamental data types namely char (character), int (integer), float, bool (boolean), double and void.
Software Engineering Initialize Stack in C++ STL std::stack is a type of container adapter, specifically designed to operate in a LIFO fashion elements can be inserted or removed from only one end
Software Engineering Exception handling in C++ C++ provides several ways to handle exceptions. We can do so by handling exceptions using custom code with try, catch and throw keywords. C++ provides custom exceptions (predefined) which we can use and it has std::cerr which is a stream for error outputs
Software Engineering Sorting in C++ using std::sort() With Standard template library available in C++, many functions are easier to implement. One of them present is sort function as well which we are going to discuss.
Software Engineering Creating a Set in C++ STL In this article, we took a look at creating a set in C++ Standard template library in different ways.
Software Engineering Add elements to your vector using Vector::push_back() in C++ In this article we will take a look into one of the most conventional ways of taking input in the vector as vector::push_back() and will try to find the complexity and other aspects in which it differs from the usual array implementation in taking the input.
Software Engineering Different ways to Initialize Map in C++ STL In this article, our focus will be to provide information about various methods of map initialization like using copy constructor
Software Engineering Different ways to initialize a vector in C++ STL In this article, we take a look at different ways to initialize a vector in C++ Standard Template library including ways to use predefined array and vector to define a new vector.