[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

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support