>By the way, wouldn't it be a little simpler if you had just used namespace std;?
Probably, but simpler isn't always better. I prefer not to pollute the global namespace simply for my own notational convenience.

-Prelude