It's not discarding values in the variable, it's discarding char left in the input stream.
try this code, 1st with the ignore commented, then without
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string test;
cout << "Enter Your First and Last Name: ";
cin >> test; // type your full name with a space between 1st and last
cout << test << endl; //outputs 1st name, last still in inout stream
//cin.ignore(100,'\n');
cout << "Now enter your age :";
cin >> test;
cout << test << endl;
system("pause");
return 0;
}