I just can't get this to work
using namespace std;
int squareArea(int &);
int circleArea(int &);
int a = 10;
int squareArea(int &a)
return a = a;
int circleArea(int &r)
return r = pir*r;
In function int circleArea(int&)':
converting toint' from `float'
I kinda understand the second one but not sure what the first one is all
It's because pi is defined as a float and everything else is an int, so it has
to convert the answer to an int when using pi in the circleArea function.
Define pi as a float
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.