I've been toying with this code, and been looking up solutions to this problem to no avail. I was told you were to add a string to a function like so in Arduino C++:
myFunction(String myString)
I've seen examples using this as well. This is the chunk of code that is having issues.
if (piezoV >= 0.25) {
Serial.println(piezoV);
// Serial.println(F("Playing track " + tracknum +""));
String file = String(trackid) + String(tracknum) + String(ext);
musicPlayer.playFullFile(String file);
int tracknum = tracknum + 1;
}
The code fetches this error:
musicPlayer.playFullFile(String file); - expected primary-expression before 'file'
I'm new to Arduino C++, and I am using experience from other languages I've learned to help, but I was wondering if SO could help me with this. Thanks in advance.