×
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.

C++

MemCpy vs MemMove [Explained with code]

In this article, we have explored the differences between the two built-in functions memcpy and memmove of C programming language. Both are part of the C library - .

Nish Patel
C++

fscanf not reading next line [FIXED]

In this article, we have explored why a C++ code using fscanf cannot read next line and how to fix it by using getline() and sscanf() in C++ by keeping the syntax same. We have demonstrated this with C++ code examples.

Aditya Chatterjee Aditya Chatterjee
C++

puts vs printf vs cout in C++

In this article, we have explored the differences between 3 output methods in C++ namely, puts vs printf vs cout in C++.

SHIVAM TRIPATHI
C++

Convert vector to array in C++ [4 methods]

In this article, we have explored 4 different methods to convert vector to array in C++ Programming Language.

SHIVAM TRIPATHI
Algorithms

Divide by 3 [9 different ways]

In this article, we will go through different ways to divide by 3 in C++ Standard Template Library (STL) and general software techniques.

Shekhar Tamrakar
C++

Different error signals in C++

There are 9 different error signals in C++ Programming Language such as SIGABRT. Each signal handles a different category of runtime error. We have listed all types of error signals in C++ along with C++ code snippets.

SHIVAM TRIPATHI
C++

Implement std::function in C++

Class template std::function is a general-purpose polymorphic function wrapper. Instances of std::function can store, copy, and invoke any CopyConstructible Callable target:

DenisO DenisO
C++

Array of Vectors in C++ STL

In this article, we will learn about Array of Vectors in C++ STL with C++ code snippets. Before getting started with array of vectors we should know about the arrays and vectors in C++.

Shruti Singh
C++

Different ways to convert vector to map in C++

In this article, we will develop an approach to find different ways to convert vector to map in C++.

Shivani Kumari Shivani Kumari
C++

Bus Error in C++

In this article, we will be discussing about "Bus Error In C++" and SIGBUS signal in detail.

Reshma Patil
C++

[Fixed] fatal error: bits/c++config.h: No such file or directory

In this article, we have explored the reason behind the C++ compilation error "fatal error: bits/c++config.h: No such file or directory" and presented the fix for resolving the error.

Benjamin QoChuk, PhD Benjamin QoChuk, PhD
C++

Advanced C++ topics

In this article, we will discuss different advanced C++ topics with a brief description along with C++ code examples.

Reshma Patil
C++

aligned_alloc()

aligned_alloc() like malloc() and calloc() is used for dynamic allocation of memory how it differs from the rest is how it enables the user to dynamically allocate the memory as well as allows us to specify the alignment for the newly allocated memory.

Harsh Dawar
openmp

[Fixed] undefined reference to omp_get_max_threads / omp_get_thread_num

In this article, we have presented the fix for the OpenMP error undefined reference to omp_get_max_threads / omp_get_thread_num / omp_get_num_threads. The issue is with the compilation command.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

#pragma omp master [explained with example]

In this article, we have explained the concept of #pragma omp master, when it is used and compared omp master with omp single.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

#pragma omp single [explained with example]

In this article, we have explained the concept of #pragma omp single, when it is used and compared omp single with omp critical and omp master.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

#pragma omp parallel [explained with example]

In this article, we have explored the concept of the OpenMP directive #pragma omp parallel along with C++ code examples.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

#pragma omp parallel for

In this article, we have explained the concept behind `#`pragma omp parallel and presented the idea with C++ code examples. We have explained how it is different from pragma omp parallel and pragma omp for.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

#pragma omp critical [explained with example]

In this article, we have explained the concept of #pragma omp critical with a C++ code example, when it is used and the difference between omp critical and omp single and atomic.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

Different ways to convert array to set in C++

In this article, we will discuss the three most common ways to convert an array into a set in C++.

Jerry Zhu
C++

Sort Vector of Custom Object in C++ STL

In this article, we will sort a vector having custom object as elements of vector in C++ using comparator.

Harsit Agarwalla
C++

Different ways to convert vector to set in C++

In this article, we have explored different ways to convert vector to set in C++.

FOUOTSOP FOSSO Patrick
C++

KMP_AFFINITY [complete guide]

KMP_AFFINITY is an environment variable that is used to control how hardware threads are distributed in relative to each other. This is used along with KMP_HW_SUBSET for finer control over the threads.

Geoffrey Ziskovin Geoffrey Ziskovin
C++

Convert vector to string in C++ [6 methods]

In this article, we have explored different ways of converting vector to string in C++.

SHIVAM TRIPATHI
C++

Duff device in C++

In this article, we will discuss about duff device in C++ with help of example. This is an optimization technique related to Loop Unrolling.

Reshma Patil
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