hi,
i need length of each string within array of strings.
following code returns 2 each line.
any suggestions?
thanks
i need length of each string within array of strings.
following code returns 2 each line.
any suggestions?
code: [select]
#define numlines 4
char *lines[numlines] =
{
"the way back\t",
"space fall\t",
"cygnus alpha\t",
"time squad\t"
};
void setup()
{
serial.begin(19200);
for(int = 0 ; < numlines; i++)
{
serial.print(lines[i]);
serial.println(sizeof(lines[i]));
}
}
void loop(void){}
thanks
please edit post, select code, , put between [code] ... [/code] tags.
you can hitting "code" button above posting area (it looks scroll < > inside it).
you can hitting "code" button above posting area (it looks scroll < > inside it).
Arduino Forum > Using Arduino > Programming Questions > Get sizeof individual array member
arduino
Comments
Post a Comment