Glad you got it. The reason it doesn't work when you go less than 10 is probably the same reason why it wasn't working when you declared your arrays without a fixed length. You are trying to write...
Type: Posts; User: syzygy
Glad you got it. The reason it doesn't work when you go less than 10 is probably the same reason why it wasn't working when you declared your arrays without a fixed length. You are trying to write...
First, fix the issue that hk mentioned. Declaring
char a[] = "";
char b[] = "";
Doesn't work for your purpose. You are trying to declare variable-sized arrays, but you can't do it that way....
a[i]=test[(2*i)];
b[i]=test[(2*i)+1];
This is going to read past the bounds of your array.
You probably want something like:
int sizeA, sizeB;