It is verbose compared to python, which would do this in about 3 lines. It's also not that great an example because it begs the question why one moment a set of strings ('words' as variable name feels weird to me because I think in c of word boundaries, but whatever) is set<string> (please use 'namespace std') and next moment its char argv. These are obviously simple things to anyone with c++ knowledge, but teaching this to someone is just likely to put them off. There's no reason to use c/c++ today unless you're coding drivers or very performance critical things.
A set isn't necessarily implemented using a red-black tree, most likely its a binary tree of some kind, but why would anyone put that in a comment. It's a set, which just means there's only copy of any repeated 'words'.
I think the reason why c++ doesn't make a good language to teach youngsters is because stl is still a beast of a template library, still spits out garbage error messages and is painful to work with even by the most experienced of developers (25+ c/c++ here)
On the other hand, collections and data structures in python are simple, efficiently implemented and extremely succinct, if the value of a dictionary element contains 2 or 3 elements, or is another dictionary, or a map etc it's simple to do this in python, where as in stl pair<int, int> is great until you need three of them, then its auto_ptr or whatever and it starts to get unwieldy and the poor student trying to focus on the algorithm is now bogged down in the with the inelegance of a low level language.
Don't get me wrong, I love c and c++, but i'd rather teach some python or ruby because they can get stuff done and working and not struggle with tedious syntax.