What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-16 05:13:15
print a multidimensional vector in c++
// A recursive function able to print a vector // of an arbitrary amount of dimensions. template<typename T> static void show(T vec) { std::cout << vec; } template<typename T> static void show(std::vector<T> vec) { int size =... Add solution -
C++ 2021-10-14 07:48:05
merge sort c++ vector
#include "tools.hpp" /* >>>>>>>> (Recursive function that sorts a sequence of) <<<<<<<<<<<< >>>>>>>> (numbers in ascending order using the merge function... Add solution -
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