you can't use the C-function sscanf to fill the c++ string "data". Use a char-array or vector (you have to make assumptions about the length of the prefix-name and date).
But better use istringstream for it. Much less hassle.
1 2 3 4 5 6
string data;
string stamp;
string temp = "deepesh 12 2009-10-10_00:31:12";
istringstream(temp) >> data >> value >> stamp;
cout<<data<<endl; // no need for .c_str() here
cout<<stamp<<endl;