Usage of play(char* filename) function in TMRpcm library

I'm attempting to create a .wav file player that will display the names of the .wav files stored on the SD card module on an LCD display. Using buttons, it should be able to scroll through the list of files. Upon finding the file the user wants to play, clicking another button will play the file on a speaker or headphones or whatever. The LCD and SD card module are working fine, i tested them earlier. The real problem is compiling the code. I'm attempting to store every filename in an array of strings. However, apparently the developer of the TMRpcm library, which is what im using to play the files, made his play() function to take char* data types as the argument. Why is it this and not a string? I have tried casting my strings to char* by using (char*), it didn't work. I recognize that the asterisk indicates it has something to do with pointers and references, i'm just unaware of why this is. Could I edit the library to make the function take strings instead, and if so, how would I do so? Ive already tried editing the .h and .cpp files, and it resulted in more errors. Any recommendations on how to get around this issue? I'd also like to know why printing file.name() in the serial monitor results in only 5 letters of the filename being displayed. I'm using an atmega328 on a breadboard and my wiring is fine. I'm running arduino 1.8.10 on Linux Mint. The lines indicated with comments saying error in all caps indicate where the errors are being thrown. I'm also completely new to this forum and has posted this on project guidance earlier, but now I realize its more appropriate in this section, but im unsure of how to delete the post in the other section.

#include <TMRpcm.h>
#include <pcmConfig.h>
#include <pcmRF.h>

#include <LiquidCrystal.h>
#include <SPI.h>
#include <SD.h>

LiquidCrystal lcd(9, 4, 5, 6, 7, 8);

File root;
File counterEntry;
byte volumeLevel = 5;
byte counter = 1;
TMRpcm music;
boolean marker = false;
long positionNumber = 0;
boolean ScrollUpButton = 0;
boolean ScrollDownButton = 0;
boolean playButton = 0;
boolean volumeUpButton = 0;
boolean volumeDownButton = 0;
boolean flowStateButton = 0;
byte repeat = 1;
byte continuous = 2;
byte shuffle = 3;
byte flowState = 1;
String Songs[450] = {};

void setup() {
 
  lcd.begin(16, 2);
  SD.begin(10);
  music.speakerPin = 3;
  pinMode(A0, INPUT); //volume up button
  pinMode(A1, INPUT); //volume down button
  pinMode(A2, INPUT); //play/pause button
  pinMode(A3, INPUT); //scroll up button
  pinMode(A4, INPUT); //scroll down button
  pinMode(A5, INPUT); //flowstate button
  root = SD.open("/");
  root.rewindDirectory();
  music.setVolume(volumeLevel);
  randomSeed(analogRead(2));
  counterEntry = root.openNextFile();

  while(counterEntry != 0)
  {
    counterEntry = root.openNextFile();
    counter++;
  }
 
  root.rewindDirectory();
  counterEntry = root.openNextFile();
 
  for(int x = 0; x <= counter; x++)
  {
    Songs[x] = counterEntry.name();
    counterEntry = root.openNextFile();
  }

  lcd.print(Songs[0]);
}

void loop() {

  if(marker == true)
  {
    music.play(Songs[positionNumber]);       //ERROR
  }

  ScrollDownButton = digitalRead(A3);

  if(ScrollDownButton == HIGH && positionNumber < counter)
  {
    positionNumber++;
    lcd.print(Songs[positionNumber]);
  }

  ScrollUpButton = digitalRead(A4);

  if(ScrollUpButton == HIGH && positionNumber > 0)
  {
    positionNumber--;
    lcd.print(Songs[positionNumber]);
  }

  playButton = digitalRead(A2);
 
  if(playButton == HIGH)
  {
    if(music.isPlaying() == 0)
    {
      music.play(Songs[positionNumber]);  //ERROR
      marker = true;
    }
    else if(music.isPlaying() == 1)
    {
      music.pause();
    }
  }

  volumeUpButton = digitalRead(A0);

  if(volumeUpButton == HIGH && volumeLevel <= 7)
  {
    volumeLevel++;
    music.setVolume(volumeLevel);
  }

  volumeDownButton = digitalRead(A1);

  if(volumeDownButton == HIGH && volumeLevel >= 0)
  {
    volumeLevel--;
    music.setVolume(volumeLevel);
  }

  flowStateButton = digitalRead(A5);

  if(flowStateButton == HIGH)
  {
    if(flowState == repeat)
    {
      flowState = continuous;
    }
    else if(flowState == continuous)
    {
      flowState = shuffle;
    }
    else if(flowState == shuffle)
    {
      flowState = repeat;
    }
  }

  if(flowState == repeat)
  {
   
  }
  else if(flowState == continuous)
  {
    if(positionNumber == counter)
    {
      positionNumber = 0;
    }
    else
    {
      positionNumber++;
    }
  }
  else if(flowState == shuffle)
  {
    positionNumber = random(counter+1);
  }
}

error message: Output Error Message: /home/santiago/Documents/Engineering Projects/_wav_File_Player_code/_wav_File_Player_code.ino: In function 'void loop()':
_wav_File_Player_code:69:37: error: no matching function for call to 'TMRpcm::play(String&)'
music.play(Songs[positionNumber]);
^
In file included from /home/santiago/Documents/Engineering Projects/_wav_File_Player_code/_wav_File_Player_code.ino:1:0:
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:31:7: note: candidate: void TMRpcm::play(char*)
void play(char* filename);
^~~~
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:31:7: note: no known conversion for argument 1 from 'String' to 'char*'
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:55:8: note: candidate: void TMRpcm::play(char*, long unsigned int)
void play(char* filename, unsigned long seekPoint);
^~~~
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:55:8: note: candidate expects 2 arguments, 1 provided
_wav_File_Player_code:94:39: error: no matching function for call to 'TMRpcm::play(String&)'
music.play(Songs[positionNumber]);
^
In file included from /home/santiago/Documents/Engineering Projects/_wav_File_Player_code/_wav_File_Player_code.ino:1:0:
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:31:7: note: candidate: void TMRpcm::play(char*)
void play(char* filename);
^~~~
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:31:7: note: no known conversion for argument 1 from 'String' to 'char*'
/home/santiago/Arduino/libraries/TMRpcm-master/TMRpcm.h:55:8: note: candidate: void TMRpcm::play(char*, long unsigned int)
void play(char* filename, unsigned long seekPoint);

I'm attempting to store every filename in an array of strings. However, apparently the developer of the TMRpcm library, which is what im using to play the files, made his play() function to take char* data types as the argument. Why is it this and not a string?

What you are trying to do is unwise, 'Strings' are created on the heap as a dynamic variable with a variable size, possibly (and in your case likely, actually for sure) causing memory fragmentation which may cause your program to crash unpredictably. This is the reason the library takes char* as an argument. String Songs[450] = {};

I'm using an atmega328

Well this is a recipe for a crashing program, you have 2kb of RAM, just the pointers to the Strings alone take up half of that already !
There is ways to convert Strings to char * but i suggest you rewrite your program to use char * also known as c-strings. c-string are statically declared, they have a fixed size up front and do not fragment. Using a processor with a very limited memory you will need to seriously manage you memory, it will be your most scarce resource.

I have a few questions. I declared my array as so: char* Songs[400] = {};
Is this the correct way to declare c_strings as you said? I've tried casting said c_strings to strings when using the lcd.print() function, like so: lcd.print(String(Songs[positionNumber]));. I've also tried casting counterEntry.name() to a char*, like so: Songs[x] = (char*)counterEntry.name();. The code compiles, but nothing is sent to the LCD. I noticed something else as well. If i run only the setup with void loop() being empty, and I try to do lcd.print("Hello World"); in setup, this prints to the LCD. However, if I try to do the exact same thing but with the code in void loop() included, nothing will display on the LCD despite the exact same line in setup. Could it be that the LCD library and the TMRpcm library are conflicting?

Scratch what I said above, i dont need to do all that casting since .print() takes char and.name() as well. And the hello world runs fine on the code with loop() now. My only problem now is printing an actual song name. I made some edits to my code:

#include <TMRpcm.h>
#include <pcmConfig.h>
#include <pcmRF.h>

#include <LiquidCrystal.h>
#include <SPI.h>
#include <SD.h>

LiquidCrystal lcd(9, 4, 5, 6, 7, 8);

File root;
File counterEntry;
byte volumeLevel = 5;
byte counter = 1;
TMRpcm music;
boolean marker = false;
long positionNumber = 0;
boolean ScrollUpButton = 0;
boolean ScrollDownButton = 0;
boolean playButton = 0;
boolean volumeUpButton = 0;
boolean volumeDownButton = 0;
boolean flowStateButton = 0;
byte repeat = 1;
byte continuous = 2;
byte shuffle = 3;
byte flowState = 1;
char* Songs[400];

void setup() {
  
  lcd.begin(16, 2);
  SD.begin(10);
  music.speakerPin = 3;
  pinMode(A0, INPUT); //volume up button
  pinMode(A1, INPUT); //volume down button
  pinMode(A2, INPUT); //play/pause button
  pinMode(A3, INPUT); //scroll up button
  pinMode(A4, INPUT); //scroll down button
  pinMode(A5, INPUT); //flowstate button
  root = SD.open("/");
  root.rewindDirectory();
  music.setVolume(volumeLevel);
  randomSeed(analogRead(2));
  counterEntry = root.openNextFile();

  while(counterEntry != 0)
  {
    counterEntry = root.openNextFile();
    counter++;
  }
  
  root.rewindDirectory();
  counterEntry = root.openNextFile();
  char* Songs[counter];
  
  for(int x = 0; x <= counter; x++)
  {
    Songs[x] = counterEntry.name();
    counterEntry = root.openNextFile();
  }

  lcd.print(Songs[0]);
}

void loop() {

  if(marker == true)
  {
    music.play(Songs[positionNumber]);       //ERROR
  }

  ScrollDownButton = digitalRead(A3);

  if(ScrollDownButton == HIGH && positionNumber < counter)
  {
    positionNumber++;
    lcd.print(Songs[positionNumber]);
  }

  ScrollUpButton = digitalRead(A4);

  if(ScrollUpButton == HIGH && positionNumber > 0)
  {
    positionNumber--;
    lcd.print(Songs[positionNumber]);
  }

  playButton = digitalRead(A2);
  
  if(playButton == HIGH)
  {
    if(music.isPlaying() == 0)
    {
      music.play(Songs[positionNumber]);  //ERROR
      marker = true;
    }
    else if(music.isPlaying() == 1)
    {
      music.pause();
    }
  }

  volumeUpButton = digitalRead(A0);

  if(volumeUpButton == HIGH && volumeLevel <= 7)
  {
    volumeLevel++;
    music.setVolume(volumeLevel);
  }

  volumeDownButton = digitalRead(A1);

  if(volumeDownButton == HIGH && volumeLevel >= 0)
  {
    volumeLevel--;
    music.setVolume(volumeLevel);
  }

  flowStateButton = digitalRead(A5);

  if(flowStateButton == HIGH)
  {
    if(flowState == repeat)
    {
      flowState = continuous;
    }
    else if(flowState == continuous)
    {
      flowState = shuffle;
    }
    else if(flowState == shuffle)
    {
      flowState = repeat;
    }
  }

  if(flowState == repeat)
  {
    
  }
  else if(flowState == continuous)
  {
    if(positionNumber == counter)
    {
      positionNumber = 0;
    }
    else
    {
      positionNumber++;
    }
  }
  else if(flowState == shuffle)
  {
    positionNumber = random(counter+1);
  }
}

char* Songs[400];like this you declare 400 pointers to character, you are aware that just 400 pointers take up 800 bytes of RAM already ? (and you have only 2048 bytes in total) Anyway it is not quite correct, i think you probably should create a 2 dimensional char array. It is not quite my specialty, hopefully someone else butts in.