Questions tagged «reserved»

2
声明会影响std名称空间吗?
#include <iostream> #include <cmath> /* Intentionally incorrect abs() which seems to override std::abs() */ int abs(int a) { return a > 0? -a : a; } int main() { int a = abs(-5); int b = std::abs(-5); std::cout<< a << std::endl << b << std::endl; return 0; } 我希望输出将是-5and 5,但是输出是-5and …
96 c++  std  reserved 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.