Tokens are just a group of characters that have been delimited in some way. So for instance you might talk about tokenising a string of comma separated values into tokens. You would mean extracting the strings appearing between the commas as separate values.
Tokenising is often, but not necessarily, done 1 token at a time.
Your first listing is better, however both of them have the class data members as public. In the real world you tend to keep all your class data either protected or private to implement the OO principle of encapsulation.
As such the first listing is better because it alread has some of the required work to make the data private done (i.e. a constructor that allows the object to be constructed with default values. Properly developed I would expect this class to end up as
class person
{
public:
person(const string& name_str, int age_int)
:name (name_str), age(age_int) { }
void setName(const string& name_str){ name = name_str; }
string getName(){ return name; }
void setAge(int age_int){ age = age_int; }
int getAge(){ return age; }
private:
string name;
int age;
};
Actually you may still want to add a default constructor, copy constructor and assignment operator to this.