What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-11-09 06:50:09
print a 3d 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 -
Python 2021-11-08 16:38:07
convert c++ code to python online
// Program to print path from root node to destination node // for N*N -1 puzzle algorithm using Branch and Bound // The solution assumes that instance of puzzle is solvable #include <bits/stdc++.h> using namespace std; #define N 3 // state space t... Add solution -
TypeScript 2021-11-07 09:17:14
make a vector of an objects c++
#include <vector> using std::vector; class MyClass { .... }; vector<MyClass> myVector( 100, MyClass() ); /* myVector now contains 100 objects of type MyClass, built with the default constructor */ vector<MyClass> myVector2; // MyVecto... Add solution -
C++ 2021-11-05 23:59:14
intersection between vector c++
#include <algorithm> //std::sort #include <iostream> //std::cout #include <string> //std::string #include <vector> //std::vector std::vector<std::string> intersection(std::vector<std::string> &v1, ... Add solution