Hi, I can't get your code to compile so I maybe wrong.

But this line

while(buf!="quit")

did catch my eye.

1. While it's syntactically correct, if you want to compare the string...