错误 C2871:'std'不存在具有此名称的命名空间

error c2871: 'std' a namespace with this name does not exist

本文关键字:命名空间 不存在 C2871 std 错误      更新时间:2023-10-16

在我的项目中,我禁用了预编译的头。以下是代码示例。。

#include <stdio.h>
#include <conio.h>
#include "Getfilelist.h"
using namespace std;

int main()
{
    Getfilelist fl;
    int i = fl.GetFList("J:\EDUCATION\Mine\seminar\seminar-1");
    getch();
return 0;
}

当我使用"使用命名空间std;"时,显示一个错误

error c2871: 'std' a namespace with this name does not exist

您应该改为#include <cstdio>