int main()
{
int count,rec_temp[]);
count=read_temps(int temps[]);
rec_temps=hot_days(int count,int temps[]);
return 0;
}

Can someone identify the error in this code please. I'm using Codeblocks; it says that it "expected a primary-expression bofre "int" "
It says the error occurs once in the first function call, and twice in the second. It would have something to do with the parameters but i don't know exactly what it is.

This line has an extra )

int count,rec_temp[]);

Sorry, that wasnt supposed to be there. That isnt in the program itself.

O.K.

Your calling your functions incorrectly.

incorrect

count=read_temps(int temps[]);
rec_temps=hot_days(int count,int temps[]);

try this, I say try because I don't have the prototypes for the functions and I'm guessing that this is correct.

count=read_temps(temps);
rec_temps=hot_days(count, temps);
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.