this is my file format:

MP,ALPX,1,9.600000e-06, 3, 2.3

I want to extract first sring, then second, then I want to extract all numbers in to a float till I come newline, there could be up to 10 values. How do I extract if my input is separted by comma instead of space?

Use getline to read each string, setting the delimiter to be the comma character. Then loop through reading in the floating point values, each read will halt at the first non-numeric char (comma or newline). Then read the next character into char, test that char to determine if it's the newline ( '\n' ) character. If not, read again, otherwise you're done. I think an array to store the floating point values is a good choice here.

That makes sense, thank you, so use getline, to pull out two sub strings, then extract ">>" the values, but I forgot to mention that at the begining of each new line there could be from one to four string commands before the values come up. Any way to use both ',' and '\n' as separator? Here is what I do now, but I would like to extract the srtings and characters with minimal processing time, so I would like to avoid the stringstream and replacing ',' with ' '.

char input_line[200];
char substr[8];
ifstream inpdeck;
istringstream string_stream;
if (inpdeck.good()) cout << endl << "Opened the file" << endl;
  while(inpdeck.getline(input_line, 200, '\n')){
    // replace commas with spces.
      *strchr(input_line,',') = ' ';
      string_stream.str(input_line); // place the string on to string stream
      string_stream >> substr; // extract the command

Thank you...

You could read in every comma separated item as a string, then attempt to convert it to a numeric value (several methods available, google is your friend). Anything that doesn't convert, consider it a text item.