using stringstream will be easier:
string sep,string1,string2;
int int1;
float float1;
getline(file,str);
istringstream ss(str);
ss>>sep>>string1>>sep>>int1>>sep>>float1>>sep>>string2;
then do...