I believe that the issue here is namespaces. See a good C++ text for a complete explanation. Your code also works in one of the two versions below which demonstrate two different ways of specifying a namespace:
[...]
gekdahl
This is not a general programming forum/website, so please stop discussing such stuff, because it violates our forum rules.
And what's more, this is completely unrelated to the error of the OP (iostream not found) !
He/she used a c-file ending and C::B treats such a file as C-code and tries to compile it with a C-compiler, which can not work for c++-code.
The namespace stuff might be a copy and paste error.
EDIT:and for both:
please use code-tags if you post source-code or log outputs, it's much more readable.
Thank you.