Hi everyone,
There is lots of info on getting values out of arrays, but very little on putting it in using an index number for the array location.
Can someone please explain why the following will work for inserting numbers, but not strings?
the last insert will not work. arr[index]="1";
Because an array is represented by a pointer, and the = operator for a pointer isn't overloaded to handle the complex requirements needed to copy a null-terminated array of strings. For that, you can use strcpy().
Hi everyone and thanks for the replies.
I just downloaded the Beta version of Simulator for Arduino and the code now works in simulation mode. Will test on a real chip now.