Hi,
I have an integer array which is a mixture of characters and integer numbers (the numbers and characters could be any value - this is just an example):
int Array1[] = {'s',250,'w',10,500,'p',15 };
I want to separate out the numbers and characters into two arrays. One of characters, and one of the integer numbers to get result:
ArrayChars[3] ...contains... {'s','w','p'}
ArrayIntNums[4] ...contains...{250,10,500,15}
The characters are commands and the numbers are data for a command. So for example {'s', 250} means "set speed to 250"
I don't even know if it is possible and I may have to store the numbers and characters in separate arrays. I think one main problem might be that some numbers and characters are interchangeable (eg 's' is also 115 and visa-versa in decimal)
Can anyone point me in the right direction?
Many Thanks