[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] How to pass an array to founction
From: |
Domenico Formenton |
Subject: |
[avr-gcc-list] How to pass an array to founction |
Date: |
Tue, 24 Dec 2013 07:50:03 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Hi,
I would like to pass an array of char to a function and, in the
function, insert some data into the array, so that it can read the data
in the calling function. Something like:
char arr[20];
compute(arr);
....
char c;
c = arr[0]; // Must return 'A'!!!!!
void compute (char a[]) {
a[0] = 'A';
...
...
}
What should I modify it to work as I want?
thank you very much.
Domenico
---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast!
Antivirus.
http://www.avast.com
dformenton.vcf
Description: Vcard
- [avr-gcc-list] How to pass an array to founction,
Domenico Formenton <=