|
|
foo.cpp: In function ‘int main()’: foo.cpp:32:24: error: ‘CalcScore’ was not declared in this scope foo.cpp:37:17: error: ‘system’ was not declared in this scope foo.cpp: At global scope: foo.cpp:53:1: warning: unused parameter ‘ifstreamRef’ [-Wunused-parameter] |
> but keep getting an error about missing an .exe file ¿why do you paraphrase an error that you don't understand? Your code does not compile foo.cpp: In function ‘int main()’: foo.cpp:32:24: error: ‘CalcScore’ was not declared in this scope foo.cpp:37:17: error: ‘system’ was not declared in this scope foo.cpp: At global scope: foo.cpp:53:1: warning: unused parameter ‘ifstreamRef’ [-Wunused-parameter] > Also I know the indents probably aren't right, but they're only like this on here, not in my actual program. Don't mix tabs and spaces in the indentation. However, that would not explain what happened at line 91 |
#include <cstdlib>
|
|
everything that you want to use must be declared prior to its first use. You can declare `system()' by #include <cstdlib> |
using namespace std;
.> and at ifstreamRef, I don't know how to fix that. It is not an error, but a warning. If you are not going to use the parameter that you pass to the function, then the function should not ask for such a parameter |
getJudgeData()
is supposed to use a reference parameter for the score (the scores from starsearch.dat)> But about my code not compiling (and thank you for showing this, since it was something it wasn't letting me do) ¿what? ¿it doesn't show you error messages? By the way, it remains to correct the case in `CalcScore()' |
|
|
double getJudgeData();
, you called getJudgeData();
but you defined double getJudgeData(ifstream contScores)
|
|
double findLowest(double lowestScore);
is not a function call
|
|
|
|
string contestantName(contName);
is not calling a function. It is creating an string variable, named `contestantName' that has the same content as the `name' string.std::string name = contestantName(input);
or std::string name( contestantName(input) );
if you prefer.double findLowest(double lowestScore);
is not a function calldouble highestScore = findHighest(score1,score2,score3,score4,score5);
(changing the prototype according)