error: expected primary-expression before ']' token

Relatively new to Arduino, but this one has me stumped!
Attempting to play 'wav' files from an SD card.

Partial code shown with Serial.print result shown), obviously,
there are other failures related to this.

char Str1[] = "what the heck"; // valid according to Arduino 'Help' page(s)

TMRpcm tmrpcm;
DS3231 rtc(SDA, SCL);

void setup()
{
delay(1000);
tmrpcm.speakerPin = 9;
tmrpcm.setVolume(2);
Serial.begin (9600);
rtc.begin();
pinMode(A0, INPUT_PULLUP);
pinMode(A1, INPUT_PULLUP);
pinMode(A2, INPUT_PULLUP);
pinMode(A3, INPUT_PULLUP);
pinMode(A4, INPUT_PULLUP);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);

//SD-WAV section vars

SD.begin(SD_ChipSelectPin);

Serial.println(Str1[]); // result on monitor is an extended ASCII char
// I can't identify, a blank square

Str1[]="welcome.wav";

Serial.println(Str1[]); // result on monitor is a tilde (~)

delay(5000);


Any and all help (without snotty comments) appreciated !

You would get a reply faster if you read the sticky: "Read this before posting a programming question ...".

char Str1[] = "what the heck";

How many characters?

char Str1[15] = "what the heck";

Big plus for using a char string- learn to do strings right from the start.
By the way, it is bad form to capitalize your variable names. Upper-case usually means constants, lower-case or camelCase is normally used for variables. Capitalized variables says that this is your first sketch.

Serial.println(Str1[]);

should be Serial.println(Str1);

Unless you want to print only the third character in the char array, then it would be

Serial.println(Str1[2]);

But [] means nothing to the compiler, which is why you get so many errors.

Did read it, read it again, ??

Whatever, my basic problem is this! My 'wav' files are of different name length, so I need a way to declare a variable that I can later utilize the 'tmrpcm.play("xyz.wav")' approach. Agreed, I am a novice at this, so I do appreciate the help. If necessary, I can also standardize the file names.

This is OK. It is, incidentally, 14 characters including the \0 terminator.
char Str1[] = "what the heck" ;

This is not as has been pointed out:
Serial.println(Str1[]) ;

Drop the []

capescw:
Did read it, read it again, ??

Please do. You seemed to have missed the part about how to correctly post code to the forum.

Attempting to play 'wav' files from an SD card.

Learning to use 8.3 filename strings may be helpful.

SOLVED !

OK, basic problems were:

A - TMRpcm.play seems only able to handle a 'quoted' string, instead of being passed a variable.

B - My fault, I totally missed the fact that 'String' requires the 'S' to be uppercase(81 year old eyes)

C - In desperation, I was trying to overcome the 'B' limitation in various ways, learning as I went.

On the positive side, I learned a lot about arrays !!

Thanks to those that helped !