Need to figure out how to properly count how many students, courses and average of their scores from a txt file. If there is a repeating course it will only count as one. For example below, class 345 is repeated so it would mean only two courses are below.
text file:
Shana Soro 345 12.5
Jim Pam 345 2.5
Sun Day 245 13.5
#include <iostream>
#include <string>
#include<fstream>
usingnamespace std;
struct mycode
{
string first_name;
string last_name;
string room_number;
double average;
}
int main()
{
mycode obj[30];
double total_average = 0;
myfile.open("Text.txt");
total_average = average/3;
cout << "Their average is: " << total_average;
cout << "The number of courses " << courses;
cout << "Please enter the last name of the student you want";
cin >> last_name;
cout << ""; // needs to print out the information on that student
cout << ""; //their ID
cout << ""; //their course
cout << ""; //their score