Hi, I need some tips on how to fix the errors of this program. I do not understand what the linker errors are telling me. thanks in advanced.
the errors are
Error 1 error LNK2005: _main already defined in test.obj test2.obj
Error 2 fatal error LNK1169: one or more multiply defined symbols found
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
using namespace std;
int main(){
ifstream inFile;
ofstream outFile;
double test1, test2, test3, test4, test5;
double average;
string firstName;
string lastName;
inFile.open("test2.txt");
outFile.open ("testavg.out");
outFile << fixed << showpoint;
outFile << setprecision(2);
cout << "Processing data" << endl;
inFile >> firstName >> lastName;
outFile << "Test scores: " << setw(6) << test1
<< setw(6) << test2 << setw(6) << test3
<< setw(6) << test4 << setw(6) << test5 << endl;
average = (test1+test2+test3+test4+test5) / 5.0;
outFile << "Average test score: " << setw(6)
<< average << endl;
inFile.close();
outFile.close();
return 0;
}