Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些麻烦about自动参考。
about
const int i = 1; auto & ri1 = i; auto & ri2 = 1; //error
为什么推断类型是ri1 const int而不是ri2?
ri1
const int
ri2
谢谢!
既然i有类型const int,但1有类型int。
i
1
int