I've declared my function where I want to find the minimum from diagonals [0][0] ... [5][5] and [0][5]... [5][0].
I have the algorithm but my problem is with the actual function header.
I have problem with creating the formal arguments for the function.
I know that we have to pass at least x[][this]
size of array to the function, but I tried various combinations, even
double minimum(int size, double x[][size]){...}
double minimum(double x[][int size]){...}
The first case gives an error when calling:
minimum(10, x[][10])
error: expected expression before ']' token `
The second case gives an error in declaration of function:
error: expected expression before 'int'
Can someone tell what the problem is (or problems are)?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…