[SOLVED] Shuffle a char array?


hi there!

i have array:

char states[4] = {'null','win','lose','accel'};

i need these 4 states shuffled every time reset code.  maybe use integers instead (e.g. 1-4?)

any appreciated!

can't use random instead? so:

code: [select]

states[ random(4) ]


Arduino Forum > Using Arduino > Programming Questions > [SOLVED] Shuffle a char array?


arduino

Comments