You have posted it as an Article under the Article / Source code section. I have moved it to the Queries and Discussion forum.

It should not and in MS compiler its an error.