Apr 4, 2013 at 8:01am UTC
For line 53, it should be bool Circle::containsPoint(double xValue, double yValue)
.
Another small mistakes at line 59 and line 61, it should be status = true ;
and status = false ;
Apr 4, 2013 at 8:02am UTC
bool Circle:: containsPoint(double xValue, double yValue)
{
// etc
}
Last edited on Apr 4, 2013 at 8:03am UTC
Apr 4, 2013 at 8:07am UTC
Sorry to hijack a little bit, but because Circle:: wasn't there, the function constainsPoint isn't accessing the class right? Or rather, isn't within scope.
Last edited on Apr 4, 2013 at 8:09am UTC
Apr 4, 2013 at 8:28am UTC
sorry out of topic...
i want to ask..
how to create a calculator programe..
please help me.. urgent..
:(
Apr 4, 2013 at 8:54am UTC
Wow, carless mistake I have made. Thank you guys for pointing it out.
Apr 4, 2013 at 1:10pm UTC
Sorry to hijack a little bit, but because Circle:: wasn't there, the function constainsPoint isn't accessing the class right? Or rather, isn't within scope.
Yes, that's correct.
1 2 3 4
bool containsPoint(double xValue, double yValue)
{
// ...
}
defines a global function, that's not part of any class.
1 2 3 4 5
bool Circle::containsPoint(double xValue, double yValue)
{
// ...
}
defines a method of the class
Circle .
Last edited on Apr 4, 2013 at 1:16pm UTC
Apr 4, 2013 at 1:20pm UTC
Oh finally now I know what a method is, thanks Mikey.