Just an update on the problem above,
It turns out that the line
r[i] = key-48;
should be
r[i] = String (key-48);
Thanks guys for your help!
Just an update on the problem above,
It turns out that the line
r[i] = key-48;
should be
r[i] = String (key-48);
Thanks guys for your help!