UTFT_tinyFAT and char *

String manipulation is unnecessarily complex in C as far as I can tell. Every time I have to do even the simplest thing, it just becomes quickly impossible. I am trying to do a simple concatenation and it has proven impossible after many hours of reading and trying stuff. Help, please. I cannot get by the compiler.

myFiles.loadBitmap(0, 0, picsize_x, picsize_y, AdvPix[curAdvPic]); requires the filename to be in a char* array. It won't function with a String array. I can't find any combination of stuff to load the filenames I find with findFirstFile into the char* array so loadBitmap can load the file onto the TFT display.

When I load the array with constants, all is well:
char* AdvPix[MaxPix]={"PIC801.ADV", "PIC802.RAW", "PIC803.RAW", "PIC804.RAW", "PIC805.RAW", "", "", "", "", ""};

It finds the files and load them into the display. They display properly. But trying to programmatically find what is on the SD card and storing it the array for later retrieval and display of the files has me totally stopped. This is not a real, working program, just a demo to try to make the compiler happy. If this can be made correct, then I can make the real program work.

How can this be made to work? My brain now hurts. Any help graciously appreciated and applauded!

#include <tinyFAT.h>
#include <UTFT.h>
#include <UTFT_tinyFAT.h>

#define MaxPix 100
char* AdvPix[MaxPix]={"PIC801.RAW", ""};

String FN, FT;
word res;

void setup() {
  
  res = file.findFirstFile(&file.DE);  // get first file
    
//Here's the compiler failure.  Should be so simple!
  AdvPix[1] = file.DE.filename; + "." + file.DE.fileext;
  
  res = myFiles.loadBitmap(0, 0, picsize_x, picsize_y, AdvPix[1]);
}

void loop() {
  // put your main code here, to run repeatedly:

}

String manipulation is unnecessarily complex in C

No, it is not. A C string is an array. it is not rocket science to put letters in the boxes in the right places.

requires the filename to be in a char* array. It won't function with a String array.

Good. An array of Strings is NOT the way to hold A file name.

String FN, FT;

Shit can these. Now.

word res;

If you don't work for Microslop, ditch this non-standard type and use a standard type. A word is a collection of LETTERS.

//Here's the compiler failure. Should be so simple!
AdvPix[1] = file.DE.filename; + "." + file.DE.fileext;

It would be, if you knew what you were doing.

AdvPix[n] is a pointer to memory. What have you made it point to? NOTHING. You are writing to who-knows-where.

char fileToPointTo[80];
strcpy(fileToPointTo, file.DE.filename);
strcat(fileToPointTo, ".");
strcat(fileToPointTo, file.DE.fileext);

AdvPix[1] = strdup(fileToPointTo);

Assemble the string in an array. Then, make a copy at some new location, and store the pointer to that location in the array. Problem solved (as long as you don't run out of memory).