Re: Reusable source code



On 2010-09-10, Malcolm McLean <malcolm.mclean5@xxxxxxxxxxxxxx> wrote:
int A[] = {1, 4, 2, 8, 5, 7};
const int N = sizeof(A) / sizeof(int);
sort(A, A + N);
copy(A, A + N, ostream_iterator<int>(cout, " "));
// The output is " 1 2 4 5 7 8".

Nit: the output is "1 2 4 5 7 8 ".
.