在C++ 11中x,y我写这个的类型是什么?
x
y
int main() { auto x = true ? 1 : 1.0; auto y = false ? 1 : 1.0; std::cout << x << endl; std::cout << y << endl; return 0; }
c++ types ternary-operator auto c++11
auto ×1
c++ ×1
c++11 ×1
ternary-operator ×1
types ×1