Declaring variables..!!!

Hey programmers. I have problem declaring SHARE in this function.
I tried many different ways but it didn't work I hope somebody help me fix the problem. Here is my source code:
int max(int r);
float share::station_max(int r)
{
int c;
float max=0.0;//Maximum gas price of gas for each station
return max;

}

Thanks for the help..!!!
closed account (zb0S216C)
Kobe24 wrote:
"I have problem declaring SHARE in this function."
share is not being declared here - share, in this context, is a scope qualifier.

Kobe24 wrote:
"return max;"
max() is a function, so treat it like one: return(max(r)); Also, max is ambiguous.

P.S: Please use code tags.

Wazzak
Last edited on
That is a snippet of code which isn't enough to illustrate your problem.

What sort of 'problem' are you having? "I have problem" isn't terribly descriptive.
Topic archived. No new replies allowed.