Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Inserting value at first index of vector and push the others to the right
- * @vector - vector
- * @size - vector total size
- * @value - value to be added
- */
- void insertAtFront(int vector[], int size, int value)
- {
- int aux_1, aux_2 = value;
- for(int i = 0; i < size; i++)
- {
- aux_1 = vector[i];
- vector[i] = aux_2;
- aux_2 = aux_1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement