What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-11 06:44:06
passing 2d array in c++ in function
If you are using GCC, then you are to pass the length of the array as a parameter to the function. void foo (int m, int arr[][m]) { //... } However, there seems to be a bug in either the compiler or the documentation, as the above function prototype ... Add solution -
C++ 2021-10-10 01:54:04
convert decimal to binary in c++
// C++ program to convert a decimal // number to binary number #include <iostream> using namespace std; // function to convert decimal to binary void decToBinary(int n) { // array to store binary number int binaryNum[32]; ... Add solution -
C++ 2021-10-09 02:25:09
how to do decimal to binary converdsion in c++
// C++ program to convert a decimal // number to binary number #include <iostream> using namespace std; // function to convert decimal to binary void decToBinary(int n) { // array to store binary number int binaryNum[32]; ... Add solution -
C++ 2021-10-07 19:31:05
what is this pointer in c++
Every object in C++ has access to its own address through an important pointer called this pointer. The this pointer is an implicit parameter to all member functions. Therefore, inside a member function, this may be used to refer to the invoking object. ... Add solution -
C++ 2021-10-07 16:11:02
sieve of eratosthenes c++
// C++ program to print all primes smaller than or equal to // n using Sieve of Eratosthenes #include <bits/stdc++.h> using namespace std; void SieveOfEratosthenes(int n) { // Create a boolean array "prime[0..n]" and initialize /... Add solution -
C++ 2021-10-06 04:29:04
timsort in c++
// C++ program to perform TimSort. #include<bits/stdc++.h> using namespace std; const int RUN = 32; // Iterative Timsort function to sort the array[0...n-1] (similar to merge sort) void timSort(int arr[], int n){ // Sort individual subarrays o... Add solution -
C++ 2021-10-06 01:17:03
built oin function to get maximumof vector
//C++ STL program to find maximum or largest //element of a vector #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { //vector vector<int> v1{ 10, 20, 30, 40, 50 }; //printi... Add solution