Hello,
Im currently trying to make a simple method for an array that would find the highest value. here is currently what i got, but do not know what to change to make it correct.
1 2 3 4 5 6 7 8 9
double FindMax(double stock[], int size){
int size = stock.length();
int max = stock[0];
for(int i = 1; i < size; i++){
if (stock[i] > max)
{max = stock{i};}
}
return max;
Thank you, i took line number 2 out. I still have an error with line #7 tho. over the equal sign, it says "Error: a value of type "double*" cannot be assigned to an entity of type "int"" and over the second { on line #7, it says " exected a ;". I do not know how to fix either of these.