You probably have a logic error (I'm to lazy to look for it right now). But you still need to do the while loop thing.
That's his problem, he doesn't want it to end. And no, you don't have to return 0 or return anything for that matter (hence return type void), as most compilers know how to handle this.
could you explain exactly what the loop is doing.. (im fairly new to C++) havent got to loops yet..