to call a function in C you use paranthesis after the name of the function.
so a function call would be the following:
writedata();
option 1 ----------------------------------------------------------------
to get items of data from writedata()
you can use the return value.
some thing like:
Code:
int a_value;
a_value = writedata();
option 2 ----------------------------------------------------------------
alternatively, have writedata() use a global variable to store
a pointer to a data structure to hold the results from writedata().
global variables are declare before main() in the file.
something like:
Code:
unsigned int* apointer; /* a variable with global scope declared before main */
int main(int argc, char* argv[]) {
writedata;
}
writedata()
{
apointer = &adatastructure;
}
if something is not true in this post let me know.
I hope this post aids some-one. considering the threads age.