cin.ignore - proste vyhodit predchozi jako cout.flush

a pak testovat if(cin)