I am trying to write a program that allows for uses to traverse the contents of a SD card with buttons on a touch screen (assume there is only one level of files; aka no folders). However, I am finding it impossible to get a "list" of all the files on the SD card:
I can't just create an array of
strings
orchar*
because I don't know the number of files on the card. Besides, I want the container to be dynamic if possible.I can't create a vector because Arduino doesn't recognize
std::vector
orvector
even when I have C++ for Arduino.Searching google produces
new
does not exist in Arduino's C++
I could use malloc
(or new
), but that would involve me creating my own container class. As interesting as that may be, the goal of what I am doing is not to implement a dynamic container class.
Have I missed something major in my search for such a function?