【问题标题】:C++ error codes global namespaceC++ 错误代码全局命名空间
【发布时间】:2012-12-10 18:27:14
【问题描述】:

我在 Visual Studio 2010 上遇到错误。 我在使用 c++ 并使用 opencv

错误 C2039:“退出”:不是“全局命名空间”的成员 错误 C2873:“退出”:符号不能在 using 声明中使用

【问题讨论】:

  • 我们需要您的代码来理解您的问题。
  • 你导入了exit()吗?向我们展示您的代码?
  • #include #include using namespace std; int main() { 返回 0; }

标签: c++ visual-studio-2010 visual-c++


【解决方案1】:

你应该

#include <stdlib.h>

在使用::exit()之前。

【讨论】:

  • &lt;cstdlib&gt;std::exit()
猜你喜欢
  • 2016-08-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-12
  • 2015-08-01
  • 1970-01-01
  • 1970-01-01
  • 2012-08-06
相关资源
最近更新 更多