×
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

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.

Ananya Verma Ananya Verma
Software Engineering

Memory leak in C++ and How to avoid it?

Memory leakage in C++ occurs when we allocates memory by using new keyword and forgets to deallocate the memory by using delete() function or delete[] operator.

Subhajit Mondal Subhajit Mondal
Software Engineering

Get introduced to using OpenMP to parallelize a C++ code

In this article, we will take a look at some of the basic ways we can use OpenMP to parallelize a C++ code. OpenMP is a feature of the compiler like GCC

Subhajit Mondal Subhajit Mondal
Software Engineering

Different ways to take input in C++

We are going to discuss how we can get different types of information from the user like from local files and interactive input using cin

Vincent Iroleh Vincent Iroleh
Software Engineering

Understanding Singleton Design Pattern in C++ with 4 techniques

Singleton pattern in C++ is a design pattern which prevents multiple objects of a class to exist. This is a very useful and widely used design pattern

Harshita Sahai Harshita Sahai
Software Engineering

Null Object Design Pattern in C++

Null object pattern is a design pattern that simplifies the use of dependencies that can be undefined. This is achieved by using instances of a concrete class that implements a known interface, instead of null references.

Harshita Sahai Harshita Sahai
Software Engineering

Understanding Observer Pattern in C++ in depth

The Observer Pattern is a design pattern where changes in one object can be notified to other objects. This is important as with this, we can use objects that have dependency

Harshita Sahai Harshita Sahai
Software Engineering

Understanding Abstract Factory Pattern in C++ with an example

Abstract factory pattern provides a framework that allows to create objects that follows a pattern. So at runtime, abstract factory is coupled with any desired factory which can create objects of desired type.

Harshita Sahai Harshita Sahai
Software Engineering

Learn to use Pair in C++ STL

pair in the C++ STL is a container defined under the library used to store a pair of two data elements or objects.

Arvind Tatiparti
Software Engineering

Use Deque in C++ STL

deque in the STL of C++ is a dynamically resizing container to implement a double-ended queue data structure.

Arvind Tatiparti
Algorithms

Generating all permutations of an array in C++ using STL

We can generate all permutations of an array by making use of the C++ STL function next_permutation.

Arvind Tatiparti
Software Engineering

Function Pointer in C++

A pointer is a variable that holds the address of another variable. Function pointers are similar and they point to functions. In this article, you will learn What is a function pointer and how to use it? and How to pass a function as an argument to another function?

Chetali Kataria
Software Engineering

Functors in C++

Function objects are another example of the power of generic programming and the concept of pure abstraction. We could say that anything that behaves like a function is a function. So, if we define an object that behaves as a function, it can be used as a function as well.

Harshita Sahai Harshita Sahai
Software Engineering

Decltype keyword in C++

Decltype stands for declared type of an entity or the type of an expression. It lets you extract the type from the variable so decltype is sort of an operator that evaluates the type of passed expression.

Harshita Sahai Harshita Sahai
Software Engineering

Auto keyword in C++

The auto keyword specifies the type of the variable that is being declared will be automatically identified by the compiler. It is used for type inference, save time while creating iterators and create method with return type as auto

Harshita Sahai Harshita Sahai
Software Engineering

Concurrency in C++

Concurrency is having multiple threads of execution for a given process. As of today, C++ does not directly support it. However, several libraries exist that will tie a given function to a new thread of execution. We look into threads, race condition, mutex, atomicity, asynchronous tasks

vineet
C++

Multipath Inheritance in C++

Multipath Inheritance in C++ is derivation of a class from other derived classes, which are derived from the same base class.This type of inheritance involves other inheritance like multiple, multilevel, hierarchical etc.

Chetali Kataria
C++

Hybrid Inheritance in C++

In C++, Hybrid inheritance is done when we have to mix different types of inheritance within a single program, for example, mixing single inheritance with multiple inheritance or multiple inheritance within a single program.

Chetali Kataria
C++

Single inheritance in C++

In C++, Single Level Inheritance or Single Inheritance is the mechanism of deriving a class from only one single base class.

Chetali Kataria
C++

Struct in C++

struct or Structure is a user defined data type which allows you to combine data items of different kinds. Structures are used to group together different data elements (types of variables) under the same name. These data elements, known as members, can have different types and different lengths.

Chetali Kataria
C++

Output in C++

Output Stream: The stream used for output is the output stream. If the direction of flow of btyes is from main memory to device( example :display screen ) then this process is called output. We explored cout, clog and cerr along with formatted output

Chetali Kataria
C++

Stack in C++ STL

Stack in the STL of C++ is a dynamically resizing container. Stack class is an container adapter. Containers or container classes store objects and data. There are in total seven standard "first-class" container classes and three container adaptor classes and only seven header files

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
C++

Multiple Inheritance in C++

In C++, when a subclass inherits from multiple base classes, it is known as multiple inheritance. The Dreaded Diamond refers to a class structure in which a particular class appears more than once in a class's inheritance hierarchy. To prevent it, virtual base class is used

Shreya Rastogi
C++

Storage classes in C++

Storage class is used to define the lifetime and visibility of a variable and/or function within a C++ program.These specifiers precede the type that they modify. They are Automatic, External, Static, Register and Mutable

Shreya Rastogi
C++

Hierarchical inheritance in C++

When more than one classes are derived from a single base class, such inheritance is known as Hierarchical Inheritance, where features that are common in lower level are included in parent class. We explore hierarchical inheritance in C++

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