【发布时间】:2013-11-21 13:10:23
【问题描述】:
我正在尝试执行以下操作:
source = new int[10];
dest = new int[10];
std::copy( std::begin(source), std::end(source), std::begin(dest));
但是,编译器报如下错误。
copy.cpp:5434:14: error: ‘begin’ is not a member of ‘std’
copy.cpp:5434:44: error: ‘end’ is not a member of ‘std’
copy.cpp:5434:72: error: ‘begin’ is not a member of ‘std’
我在代码中包含了所需的<iterator> 标头。有人可以帮我解决这个问题吗?
【问题讨论】:
标签: c++ compiler-errors iterator syntax-error std