What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-22 19:36:12
pass by address array in c++
#include <iostream> using namespace std; // function declaration: double getAverage(int arr[], int size); int main () { // an int array with 5 elements. int balance[5] = {1000, 2, 3, 17, 50}; double avg; // pass pointer to the array ... Add solution -
TypeScript 2021-10-20 13:28:03
hwo to copy an array structs to another in c
typedef struct Person{ int phone; char first[150]; char last[150]; char mail[150]; } person; void person_copy(person arr1[], person arr2[], int size){ int i; for(i=0; i<size; i++){ arr2->phone = arr1->phone; strcpy(arr2[i].first, ar... Add solution -
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 21:42:07
reverse an array in c++ using while loop
#include <iostream> using namespace std; int main() { const int SIZE = 9; int arr [SIZE]; cout << "Enter numbers: \n"; for (int i = 0; i < SIZE; i++) cin >> arr[i]; for (int i = 0; i < SIZE; i++) cout << ar... Add solution -
Java 2021-10-14 19:50:03
java hash password
import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import java.util.Arrays; import java.util.Base64; import java.util.regex.Matcher; impor... Add solution -
C++ 2021-10-12 02:18:03
length of each number in array in c++
const int SIZE = 9; int arr[SIZE], arr2[SIZE]; cout << "Enter numbers: \n"; for (int i = 0; i < SIZE; i++) cin >> arr[i]; for (int i = 0; i < SIZE; i++) cout << arr[i] << "\t"; cout << endl... Add solution -
Other 2021-10-10 19:37:06
unity array of gameobjects
If you want to create an array of this gameobject, you can do this as follows: int Size = 10; //Number of objects GameObject[] Tiles = new GameObject[Size]; Let's assume you have created a prefab, called "Tile". If we want to initialize the... Add solution