I am trying to write a function that stores all my filenames inside an array of strings.
basically will use a while loop, then retrieve the filenames, but i do not know before hand how many arrays of the string i should require before hand.
Is there a way to create a string array without knowing how many beforehand? or are there workarounds? open to suggestions. thanks
im using sdfat library.
 numFiles = 0;
 sd.vwd()->rewind();
 while (file.openNext(sd.vwd(), O_READ)) {
  String filename[numFiles] = file.printName(&Serial);
  numFiles ++;
  file.close();
 }