In C++, use the string class and member functions to find() a specific substring's (or character's) position and then use substr() to get the piece of the string you want.
Alternately, and what I would do, is use a stringstream to parse the string into pieces.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
...
string line;
while (getline( myfile, line ))
{
string first, middle, last;
istringstream liness( line );
getline( liness, middle, '@' );
getline( liness, first, '@' );
getline( liness, last, '@' );
cout << "Full name is: " << first << " " << middle << " " << last << ".\n";
}