Something like this: void compute(char *a, int aLen) { // could also be "unsigned int aLen"
if (a == NULL || aLen < 1) { // error return; } a[0] = 'A'; // make sure to check the length of the array before referencing deeper into it ... ... } char arr[20]; compute(arr, 20); ... Good luck! ~James
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list