of all the code in the world to convert, you picked this?!
If you have a similar assignment, you should just sit down and rewrite it. The guts are there, sure, but its harder to convert than rewrite if you don't understand anything. Or re-google and find a c++ version. You won't learn much converting this with someone else doing it, and you will fall more behind than you already are.
on top of what was said you have to strip out the unnecessary class, write a proper main, get the correct includes (lose the import), fix your memory leak (java does for you) or use vector (more to convert and learn) and just for the head on desk of it fix 22-32 (its like one line of code, you don't need all those conditions). By the time you did all that, a clean page was the better way.