Easy Question! (2 seconds) :)

int BMR(int persons_weight);
    return(70 * ( persons_weight /static_cast<double> 2.2) );

my error is "expected unqualified-id before '{' token"..
ignore the code . Just tell me why? or what I need to do
You don't want that ; after your function definition.
Thank you!
Also there is no any sense to use static_cast<double> because literal 2.2 already has type double. So you can simply to write

return(70 * ( persons_weight / 2.2) );

By the way as the function return type is int and the expression in the return statement has type double the compiler can issue a warning.
ok Will Do. Thanks
Topic archived. No new replies allowed.