2bd Subj : Re: while(in) To : borland.public.cpp.borlandcpp From : waking@idirect.com (Wayne A. King) Date : Mon Mar 22 2004 06:31 am On Sun, 21 Mar 2004 23:05:26 -0500, Les Hurley wrote: > while(in){in>>n; > cout<> n extraction fails. But you're displaying the variable n even when the extraction fails, and it still contains the value from the last successful extraction. See if this works better: while(in >> n){cout<