InfiniteLoop Fixed!

Finally figured out my infinite loop problem.
cin.clear();   //clear error flags
cin.sync();    //flush the input