×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

C++

C++ is a powerful, object oriented and early programming language which is derived from C. It is widely used in production systems and gives huge control to the programmer.

Software Engineering

Introduction to Make and Makefile

We have explained the concepts behind Make tool and Makefile which forms the basics of compiling and building executable for a C/ C++ project codebase.

Kshitiz Saini Kshitiz Saini
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.

Sourajeet Mohanty Sourajeet Mohanty
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.

Harshita Sahai Harshita Sahai
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.

Syed Mujtaba Hadi Jafri
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.

Saatwik Bisaria
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.

Harshita Sahai Harshita Sahai
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

Harshiv Patel Harshiv Patel
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

Dilip Krishna
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

OpenGenus Tech Review Team OpenGenus Tech Review Team
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.

Harshita Sahai Harshita Sahai
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().

Harshita Sahai Harshita Sahai
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.

Sourajeet Mohanty Sourajeet Mohanty
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.

Sai Kranthi
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

Shivang Patel
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.

Riya Deb
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

Harshita Sahai Harshita Sahai
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.

Harshita Sahai Harshita Sahai
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.

Harshita Sahai Harshita Sahai
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.

Siddharth Gusain Siddharth Gusain
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

Eashwaran Raghu Eashwaran Raghu
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

Bhupesh Varshney
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.

Harshita Sahai Harshita Sahai
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.

Harshita Sahai Harshita Sahai
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.

SUBHAM PRATAP SUBHAM PRATAP
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

Prashant R
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship