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;
}

Nevermind!! I got it!!

i didn't name the function :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.