SD.open file question/problem

I have a sketch that monitors and logs multiple sensors. It all works good if it logs everything to one log file. What I want to do is log each sensor to it's own log file. I have a function that assembles the sensor values and a time stamp, then writes it to the SD card. I get a compile error when I try to use a variable in the SD.open statement. Not sure what I'm missing, or what other method I should use.

Here is the error I get:
Time_and_Sensor_Log.ino: In function 'void logit(long int, String, int, String)':
Time_and_Sensor_Log:105: error: no matching function for call to 'SDClass::open(String&, int)'
C:\Program Files (x86)\Arduino\libraries\SD\src/SD.h:73: note: candidates are: File SDClass::open(const char*, uint8_t)

Here are two samples of the code for the Open and Write portions of the function.

/*  Sample one that works  */      
   Serial.println("Opening a log file");  // Print msg. to know I got here.
   File Datafile = SD.open("Sensor4.txt", FILE_WRITE);   
   Datafile.println(dataString);   // Write assembled data information
   Datafile.close();
   Serial.println(dataString);  // Print it for diag.


/*  Sample two  causes error*/      
   String fileName = "Sensor4.txt";
   Serial.println("Opening a log file");  // Print msg. to know I got here.
   File Datafile = SD.open(fileName, FILE_WRITE);   
   Datafile.println(dataString);   // Write assembled data information
   Datafile.close();
   Serial.println(dataString);  // Print it for diag.

I get a compile error when I try to use a variable in the SD.open statement.

No. You get an error when you try to use the wrong type of variable in the SD.open statement.

Do yourself a favor. Forget that the stupid String class even exists. Use char arrays.

   char *fileName = "Sensor4.txt";
   Serial.println("Opening a log file");  // Print msg. to know I got here.
   File Datafile = SD.open(fileName, FILE_WRITE);

OK, never mind, I found my problem. Needed to define as 'char*' instead of 'String'. Just overlooked it too many times.