auto解析出来了个啥?
  • 板块灌水区
  • 楼主OrinLoong
  • 当前回复8
  • 已保存回复8
  • 发布时间2024/10/18 10:27
  • 上次更新2024/10/18 15:17:32
查看原帖
auto解析出来了个啥?
539345
OrinLoong楼主2024/10/18 10:27

如下代码中:

#include <bits/stdc++.h>
using namespace std;
const int pd[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};
int main(){
    for(auto d : pd){
        printf("%d,%d\n",d[0],d[1]);
    }
    return 0;
}

auto成功工作。但是VScode没告诉我auto解析出来了啥。换句话问,如果不用auto,这个类型名应该填啥?

2024/10/18 10:27
加载中...