0

I have a code present but why do I have three c2447 errors by line 31,43, and 62 ?
What are the ways to prevent that code ever present in the c++ system?

//This is the software access for the
//lowest score test drop at any level
//in the system
#include <iostream>
using namespace std;

void main ( )
{
    //Introduction System
    cout << "\t\tMy System\n";
    cout << "\tSystem IV\n";
    cout << "\n";

    int score1,score2,score3,score4,score5;
    //Get scores now
        void getScore(int *p);
        getScore(&score1);                                  //Score I
        getScore(&score2);                                  //Score II
        getScore(&score3);                                  //Score III
        getScore(&score4);                                  //Score IV
        getScore(&score5);                                  //Score V
        system ("pause");                                   //Pause System for a moment
}

//Defintions
//****************
//Score Input Act*
//****************

void getScore(int *p);
{
    //Inputting scores with spaces please!
    cout << "Please enter five scores in respectable spaces: ";
    cin >> *p;
}

//*******************
//average Score Act *
//*******************

void average (int sc1, int sc2, int sc3,int sc4,int sc5);

    {
    if (low==sc1)
        average=static_cast<float>((sc2+sc3+sc4+sc5)/4);
    else if (low==sc2)
        average=static_cast<float>((sc1+sc3+sc4+sc5)/4);
    else if (low==sc3)
        average=static_cast<float>((sc1+sc2+sc4+sc5)/4);
    else if (low==sc4)
        average=static_cast<float>((sc1+sc2+sc3+sc5)/4);
    else
        average=static_cast<float>((sc1+sc2+sc3+sc4)/4);
    cout << "Average of such test scores: ";
    cout <<average;
    }

//**************************
//Find the Lowest Score act*
//**************************
void findLowest (int sc1, int sc2, int sc3, int sc4, int sc5);
{

    if (sc1 <= sc2 && sc1 <= sc3 && sc1 <= sc4 && sc1 <= sc5)
    {
        return sc1;
    }
    else if (sc2 <= sc1 && sc2 <= sc3 && sc2 <= sc4 && sc2 <= sc5)
    {
        return sc2;
    }
    else if (sc3 <= sc1 && sc3 <= sc2 && sc 3 <= sc4 && sc3 <= sc5)
    {
        return sc3;
    }
    else if (sc4 <= sc1 && sc4 <= sc2 && sc4 <= sc3 && sc4 <= sc 5)
    {
        return sc4;
    }
    else 
        return sc5;

    return 0;
}
//End

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by NathanOliver
0

you have a semicolon after your function name

void average (int sc1, int sc2, int sc3,int sc4,int sc5);  <---  get rid of this
{
    // ...
}
void findLowest (int sc1, int sc2, int sc3, int sc4, int sc5);   <---  get rid of this
{
    // ...
}

Edited by NathanOliver: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.