|
|
main.cpp:21:12: error: ‘rand’ was not declared in this scope j = rand() % 52; ^ main.cpp:22:17: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive] xorSwap(deck[i], deck[j]); ^ main.cpp:5:6: error: initializing argument 1 of ‘void xorSwap(int*, int*)’ [-fpermissive] void xorSwap(int* x, int* y) { ^ main.cpp:22:26: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive] xorSwap(deck[i], deck[j]); ^ main.cpp:5:6: error: initializing argument 2 of ‘void xorSwap(int*, int*)’ [-fpermissive] void xorSwap(int* x, int* y) { |
#include <cstdlib>
xorSwap(&deck[i], &deck[j]);
|
|
Before: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, After: 12, 11, 25, 44, 0, 45, 17, 4, 33, 28, 39, 48, 22, 43, 16, 37, 50, 5, 6, 36, 47, 9, 51, 23, 29, 41, 18, 30, 40, 21, 8, 7, 24, 14, 10, 13, 42, 34, 20, 26, 3, 2, 46, 32, 19, 38, 27, 1, 35, 15, 31, 49, |
|
|