#include <fstream> 
#include <iostream> 
#include <string> 
using namespace std; 
  
int main() 
{ 
  // open aboutYou.txt for input 
  ifstream fin; 
  fin.open("aboutYou.txt"); 
  if (!fin.good()) throw "I/O error"; 

  // read an int from one line of an input file 
  int age; 
  fin >> age; 
  fin.ignore(1000, 10); 

  // read a double from one line of an input file 
  double gpa; 
  fin >> gpa; 
  fin.ignore(1000, 10);
 
  // read a string from one line of an input  string name; 
  getline(fin, name); 

  // read a char from one line of an input file 
  char gender; 
  fin >> gender; 
  fin.ignore(1000, 10); 
  
  fin.close(); 
} 
