comparison between pointer and integer

float solve ();
void DisplayRemarks ();

int main()
{

cout << "\n\n\n";
cout << "\n\t\t\t_____________________________________\t\t\t";
cout << "\n\t\t\t ==== SUMMARY RESULTS ====";
cout << "\n\t\t\t_____________________________________\t\t\t";
cout << "\n\t\t Number of Right Answers :=> "
<< right << ".";
cout << "\n\t\t Number of Wrong Answers :=> "
<< wrong << ".";
cout << "\n\n";
cout << "\n\t\t Your Grade : ";
solve();
cout << "\n\t\t Remarks : ";
DisplayRemarks ();
cout << "\n\n";

cout<<"\n\t\tFor playing again press 1 or 0 for exit :";
cin>>terminate;
}
while (terminate!=0) ;
return 0;
}
float displaysolve (float right, float wrong)
{
float s;
s= (right/10.0)*50+50;
return (s);
}
void DisplayRemarks ()
{
string remarks;
if (solve >= 75) { //in this line the error occurred.
remarks = "You Passed the Quiz Congrats !!!";}
else {
remarks = "Sorry you Failed the Quiz Try Again!!!";}
}
Last edited on
can you paste the exact error and the exact snippets where the error occurred ?

BTW, what is solve ?
the function of solve is to compute for the grade and so that the remarks will be identify.
Please use code tags when posting code, to make it readable.

If solve is a function, then:

if (solve >= 75) { //in this line the error occurred.

has an obvious mistake - that's not the syntax you use to call functions. I recommend you go back to your textbook and read up on how to call functions.
Topic archived. No new replies allowed.