Help with coding pointer to tables

Hi,
I would need some help for the folowing problem.

I need to create a function that initialize a device (temperature measure).
It has to return an error code ( OK or the type of error) - (easy stuff here)
But it has also to modify (and thus "return" a short table - the address of the device byte[7]).

I have difficulties in coding how to send the pointer to the table and how to send back the result ;

If coded in the setup it works fine but could not find a way to make it work in an external function.

Thank you

Posting your code and the eventual circuit is the only way to make others understand what you are struggling with :wink:
Maybe in the arduino reference page

section "Pointer Access Operators" should be helpful.
Good luck :wink:

Thanks,

I have read the reference and also some C++.
I did work (well) with pointers for single variables but not with tables.
The reference did not helped me to solve the problem.
I have at least three versions of code each with different errors (long listings) so the question I am asking is
"How to modify an external table ( wich contains for example a MAC adress) in a function and how to pass the pointer as argument. a practical example would be usefull for me.
It may eventually prove simple but my experience does not allowed me to advance alone.

Thank you for your help

I am having trouble understanding what you are trying to do, sorry :pensive:
Could this webpage give you any idea?

The website has a buil-in onlnine compiler, btw. You can use it to try out some code without a board.
Sorry again

Hi,

Finally I managed to make it work. In fact very simple STUPID errors of a beginner. Thank for the link.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.