Path: utzoo!mnetor!uunet!husc6!cmcl2!beta!hc!hi!kurt From: kurt@hi.unm.edu (Kurt Zeilenga) Newsgroups: comp.lang.c Subject: Re: C Quirk?? Message-ID: <23498@hi.unm.edu> Date: 5 Feb 88 22:51:52 GMT References: <1653@ssc-vax.UUCP> <804@PT.CS.CMU.EDU> Reply-To: zeilenga@hc.dspo.gov (Kurt Zeilenga) Organization: U. of New Mexico, Albuquerque Lines: 13 In article <804@PT.CS.CMU.EDU> edw@IUS1.CS.CMU.EDU (Eddie Wyatt) writes: >Not that this requires a net response, I just like reading my posts :-) > >#define clearline() while (getchar() != '\n') >ch = getchar(); >clearline(); >Eddie Wyatt e-mail: edw@ius1.cs.cmu.edu If you want to read the whole line (like for a command line parser), then I would suggest using fgets() or gets() and then using scanf to grab out whatever you wanted. Examples? try K&R. -- Kurt (zeilenga@hc.dspo.gov)