system
October 16, 2009, 1:22pm
1
Hi , O.k. my next part.
I'm working a simple library, or more truthful just splitting my code up to stop it getting so long.
I have a string array , Rfid_tag[8][13] now filled with tags.
How do I make my library see it without getting a RFid_tag not in scope error.
H_file
#ifndef common.h
#define common.h
#include "WProgram.h"
void print_list(???????);
#endif
ccp_file
#include "common.h"
void print_list(???????)
{
Serial.println(RFid_tag[1]);
}
skech_file
print_list(????????);
I don't want to pass a single array, but give it access to the full array.
Can anyone fill in the missing ????????s Please
system
October 16, 2009, 1:34pm
2
I have a string array , Rfid_tag[8][13] now filled with tags.
Do you mean an array of string objects, or just a byte/char array?
system
October 16, 2009, 1:41pm
3
Sorry not fully converse with c terms.
I would think I mean “array of string objects”
eg a array of strings , not array of chars which form a string , if that makes any sense.
make with :-
char RFid_tag[][13]= {"","123456789012","","","","","",""} ;
system
October 16, 2009, 2:07pm
4
No, that's just a char array.
void print_list (char tag [][13]);
void print_list (char tag [][13])
{
Serial.print (tag [1]);
}
print_list (RFid_tag);