Ok I am suppose to do this:
For research purposes and to better help students, the admissions office of your local university wants to know how well female and male student GPAs for certain courses. Due to confidentiality, the letter code f is used for fimale students and m for male students. Every file entry consists of a letter code followed by a GPA. Each line has one entry. The number of entries in the file is unknown. Write a program that computes and uptputs the average GPA for both females and male students. Format your results to two decimal places.

That is the question and this is what i have so far in code:
Code:
//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 f;
double m;
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;

inData >> m >> f;

if(m == m)
cout<<"Your average test score is : " <<m<<endl;

else 
cout<<"Your average test score is : " <<f<<endl;


//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;



outData.close();
getch ();
return 0;
}

is there any way to make the calculations in the input.txt file and then read it from the file. Its suppose to add all the m scores and give an average if they answer m and add all the f and give the average it they answer f.

I'm 100% stuck and have no idea how to do this >_< I've tried it different ways but it's still wrong pleasee helps

This is the input file http://www.geocities.com/lifeis2evil/input.txt
in my computer I have it in the same drive as the project. The outData works fine, I just need help with the inData. ..Thank you!!