Invalid type argument of unary '*' (have int?
-
29-10-2019 - |
سؤال
I have read other questions like this but none seemed to work... My code is:
int flowRateFormula(int pipeDiameter,double velocity)
{
int integer3;
integer3=PI*(1/4)*(pow(pipeDiameter,2))*velocity;
return integer3;
}
And the error is:
flowRate.c: In function ‘flowRateFormula’:
flowRate.c:38:13: error: invalid type argument of unary ‘*’ (have ‘int’)
What to do? BTW PI IS DEFINED
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow