Well hello to my first post in here.

This is basically a test post to see how Markdown, the syntax highlighter etc. work together.

Anyways, here is a little example code taking its command line arguments and printing them out again using iterator based standard algorithms.

#include <algorithm>
#include <iostream>
#include <iterator>

int main(int argc, char ** argv)
{
    std::copy(
        argv + 1,
        argv + argc,
        std::ostream_iterator<char *>(std::cout, " ")
    );
    return 0;
}

One could also just do it like this:

#include <iostream>

int main(int argc, char ** argv)
{
    for (int n = 1; n < argc - 1; ++n)
        std::cout << argv[n] << " ";
    if (argc > 1)
        std::cout << argv[argc - 1];
    return 0;
}

Yet this does not look as nice. The argc - 1 and the if (argc > 1) were neccassary so there would not be a trailing whitespace at the end of the output.