"\n" is a C string, ends with a NULL char, 0. Hence a 10 and a 0.
'\n' is a char with value 10.
" is not '
"\n" is a C string, ends with a NULL char, 0. Hence a 10 and a 0.
'\n' is a char with value 10.
" is not '
since I got it the fix size working and I know I have engoug allocated and I could have max 65,534 files in one folder with a fat32 . I want to make something like this.
Make an array with int_32 for the amound of titles and char array for the title itself.
Or as text...
char (*pTitle)[MaxTitleLength]
char Title[MaxTitleLength] ;
char chr;
Title[cntLetter] = chr;//for filling each character
Title[cntLetter+1] = '\0'
pTitle= &Title;
What I get is that the first is filled and the rest are empty, so I m not filling in the right I think. Or I diden't preserve the memorie right.
You should ask yourself what is a realistic usable max number of file and go for that and just ignore files beyond that number for example (and issue a warning).
Ok. I will do that. Could you answer my question... I am just curious to know that..
In de meantime I dit this an see I am not getting furder that overriding the first one each time. How can I add multieple string to a pointer?
Which one? (I’m on my cell so limited ability to read)
Please use code tags when posting code
This question.. why I am overriding the first one each time by doing this pTitle= &Title;
If I do printf("additon is: %s\n", TitlePointer); after pTitle= &Title; I see it's filled in. But when I plot after the loop like this.
//////print values
for (int i = 0; i < cntTitle;i ++) {
Serial.println(TitlePointer[i]);
}
I get
{
001.mp3
��
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.