双语词卡 · 常用度第 96 位

auto

🤖 根据放进盒子的东西自动打印类型标签

如 `auto x = 3.14;`,编译器会自动识别 `x` 是 `double`。

English

🤖 Lets the C++ compiler deduce the variable type automatically

Automatic type deduction keyword in C++11+.

代码示例

for (auto x : vec) cout << x;
探索 100 张双语词卡 →