Read input from a file and loop it
Please help me .. thank you
//include section
#include <iostream>
#include <conio.h> //for use with getch
#include <string> //string data types
#include <fstream> // in and out data
using namespace std;
int main ()
{
string name,majorname,coursename;
ifstream inData;
ofstream outData;
double gpa;
double average;
char gender;
inData.open("input.txt");
outData.open("outData.txt");
//stuff writting out to screen / displayed
cout<<"Hello there, What is your name?"<< endl;
getline(cin,name);
cout<<"Welcome "<<name<<endl;
cout<<"Please enter your degree your majoring in."<<endl;
getline(cin,majorname);
cout<<"What the name of the course your taking for your major "<<majorname<<" ?"<<endl;
getline(cin,coursename);
cout<<"What is your gender? Enter m for male or f for female"<<endl;
cin>>gender;
//Stuff written out to txt file
outData<<"Person's name is " <<name<<". And there degree major is "<<majorname<<"."
" The class course name for there degree major is "<<coursename<< "."<<endl;
while (gender == m)
{
}
if (gender == 'm') // if gender is male
inData >> gender >> gpa;
else if (gender == 'f') // if gender is female
inData >> gender >> gpa;
getch ();
return 0;
}

