【发布时间】:2016-03-08 06:23:40
【问题描述】:
我在 VS2008 中遇到了这种奇怪的行为,我可以使用以下代码在新项目中重现:
#include <cctype>
using namespace std;
int main() {
isspace(' ');
iswspace(L' ');
std::isspace(' ');
std::iswspace(L' '); // <--- ONLY THIS LINE has error
return 0;
}
std::isspace 和 iswspace 不会导致编译错误,但 std::iswspace() 会。
我不明白为什么 std::isspace() 会是 std 的成员,但 std::iswspace() 不是。我怀疑这是符合标准的行为。
【问题讨论】:
-
我认为你需要#include
-
@AndyM 谢谢!您可以将其发布为答案吗?你也知道为什么
iswspace()没有std::有效吗?
标签: c++ visual-studio visual-studio-2008 compiler-errors