I'm not sure you really want operator>>/<< but you could try something llike -
Code:
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
istream& operator>>(istream& in,string& s)
{
char c;
c = in.get();
if(c!=' ')
in.putback(c);
return getline(in,s,',');
}
int main()
{
string abc = "3.45654 45430 two words,";
stringstream ss;
float a;
int b;
string c;
ss << abc;
ss >> a >> b >> c;
cout << a << ' '<< b << ' ' << c;
return 0;
}
This would rely on your file having a set format of float-int-string with a comma delimiting the end.