从代码的C++11部分降级
Downgrading from C++11 part of code
具体而言:
file.ignore(std::numeric_limits<std::streamsize>::max(), 'n');
它抛出以下错误:
- Numeric_limits不是std的一部分
- "<"之前应为主表达式代币
- 对max((的调用没有匹配的函数
它在VS中有效,但在Dev-cpp中无效。
我如何才能消除这些错误?
这不是C++03/C++11的问题,而是缺少include:
#include <limits>
模板std::numeric_limits<>
已经存在很长时间了。
相关文章:
- MSVC是否支持C++11样式的属性而不是__declspec
- 创建LinkedList退出,返回代码为-11(SIGSEGV)
- 我可以将一个用clang c++11编译的对象与另一个用c++17编译的对象链接起来吗
- 继承:构造函数,初始化C++11中基类的类C数组成员
- 如何将模板转换为C++11之前的模板
- c++11评估顺序(未定义的行为)
- C++中的VLA,扩展名为std=C++11
- 代码在我的计算机上运行良好,但是在将其提交给coursera时遇到未知的信号11问题
- "类模板示例<int>;"语句对 C++11 是什么意思?
- this_thread::sleep_for和计时时钟之间的关系是否由C++11标准指定
- 如何使用lock_guard在c++11中实现scoped_lock功能
- C++11 中不同类型的对象的 std::array 的替代方案
- 为什么 -mmacosx-version-min=10.10 不阻止使用标记为从 10.11 开始的函数?
- 为什么我的C++代码中出现'Segmentation Fault: 11'行?
- 强枚举类型定义:Clang Bug 还是 C++11 标准不确定性?
- 别名模板的专业化 C++11 中没有开销的最佳替代方案
- STLPort using C++11
- C++ C++类中的命名空间降级
- Qt 5.11.2 (Clang 8.0 (Apple), 64 位), 找不到 QJSEngine 文件
- 从代码的C++11部分降级