I have an SD card which I filled with 15 mp3 tracks and a text file that has 15 words and 15 tracks names. My question is regarding initializing the following
char* words[ ]
char* tracks [ ]
When I initialize them as [100] and [100], the listing of the dB doesn't work as I currently only have 15 tracks and words. I want code to have the ability to place 999.
So my question is: can I make both them variable arrays and how?
I tried leaving between the brackets empty and several other methods but they didn't work. So I wondering if anyone here have any other suggestions.
mallocand thenrealloc?char*words[]is an array of pointers! You will need buffer for string data alsochar[][]. As this is all dynamic, you better not use static arrays, but use somenewkeywords.