error: ‘gets’ was not declared in this scope gets(str);

PAT中:
error: ‘gets’ was not declared in this scope
            gets(str);

error: ‘gets’ was not declared in this scope      gets(str);
原因:
gets()方法已经不被PAT编译器支持了,因此要采用其他方法。
header添加:
         #include <iostream>
         using namespace std;
将gets(str);改为:
         cin.get(str,n);//n为str数组的长度

error: ‘gets’ was not declared in this scope gets(str);

上一篇:4-2-3 Fragment(三)


下一篇:深度识别:论文阅读_2S-AGCN CVPR2019(基于骨架的动作识别的两流自适应图卷积网络)