Not familiar with C++ specifically but reading through it, it looks like the logic is good. What development environment are you using? Offhand I would say it could easily be a syntax error. Visual C++ will spot those for you and will also find improper useage of things. The express edition is free.



