Why is this code not working?
#include <algorithm>
int main() {
int a[10];
enum { a_size = sizeof a / sizeof *a };
std::fill(a, a + a_size, a_size);
}
g ++ 4.1.2 and 4.4.3:
In the function 'int main ()':
Line 5: error: there is no corresponding function to call "fill" (int [10], int *, main () :: <anonymous enum>) '
Is this code valid C ++ 0x?
Roger Pate
source
share