this program works fine in visual studio put i need to make it work in emacs and this is what i have and there are two bugs i have that i cant solve one on line marked (97)and one on line marked (213)
------------------------------------------------------------------------well that does not work here is the code i have so far i only got that error on line 96 thats now line 97 and one news one on 213
------------------------------------------------------------------------------
include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
for (int i = 0; i < count; i++)
for (int k = 0; k < 5; k++)
{
person[i].score[k] = 0;
}
cout << "Please enter the file name containing skater scores" << endl;
cin >> file;
infile.open(file.c_str());
void bubblesort(skater list[ ],int count)//descending
{
int i;
int j;
skater temp; //used when values are interchanged
for (i=0; i < count-1; i++)
for (j=0; j < count-(i+1); j++)
if (list[j].lName[0] > list[j+1].lName[0])
{
temp = list[j];
list[j] = list[j+1];
list[j+1] = temp;
}
}
void finalScore(skater person[], int count)
{
double sum = 0;
double min;
double max;
for(int i = 0; i < count; i++)
{
min = person[i].score[0];
max = person[i].score[0];
for(int j = 0; j < 5; j++)
{
sum = sum+person[i].score[j];
if (min > person[i].score[j])
min = person[i].score[j];
if (max < person[i].score[j])
max = person[i].score[j];
}
sum = sum - max;
sum = sum - min;
person[i].final = sum;
sum = 0;
}
}
void printname(skater person[], int count)
{
cout << fixed << showpoint << setprecision(2);
cout << left <<setw(10) << "NAME" << right << setw(10) << "Entry #" << endl;
for (int i =0; i < count; i++)
{
cout << left <<person[i].lName << "," << person[i].fName << right <<
setw (20) << person[i].entry << endl;
}
cout << " " << endl;