I cannot understand why would Visual Studio Intellisense complain. In the code:
int absolute_value(int x) {
return x > 0 ? x : - x;
}
It underlines x
in return x
with the message: return value type doesn't match the function return type.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.