0

For some reason when i'm trying to declare a float function it gives me this error. But if i declare a void or any other type of function it works...

any ideas? THANKS!!

#include <iostream>
#include <cstring>
#include <iomanip>

using namespace std;

void inputInfo(float *** rawScores, char names[ ][50], int * kount);
float ** (float *** rawScores, int * kount);  //ERRORS HAPPEN HERE

int main()
{
	
//YADA YADA

	return 0;
}


void inputInfo(float *** rawScores, char names[ ][50], int * kount)
{
	cout << "Input competitors name: ";
	cin.getline(names[*kount],50);        
	
	
	for(int x=0; x<1; x++)
	{
		cout << "Input competitors Event " << x+1 << " scores." << endl;
		for(int c=0; c<6; c++)
		{
			cout << "Judge #" << c+1 << ": ";
			cin >> rawScores[*kount][x][c];
		}
	}
	
	(*kount)++;
}


float ** (float *** rawScores, int * kount)   //AND HERE
{
	float ** Skores = new float * [5];
		for(int y=0; y<5; y++)
			Skores[y] = new float [50];
	float sum = 0;

	for(int z=0; z<*kount; z++)
	{
		for(int y=0; y<5; y++)
		{
			for(int x=0; x<6; x++)
				sum = sum + rawScores[z][y][x];
			
			Skores[y][z] = sum;
			sum = 0;
		}

	}
return Skores;
}
1
Contributor
1
Reply
3
Views
7 Years
Discussion Span
Last Post by Veri7as
This topic has been dead for over six months. 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.