cvs.gedasymbols.org/archives/browse.cgi | search |
From: | plunket AT eidetic DOT com DOT anti-spam (Tom Plunket) |
Newsgroups: | comp.lang.c++,comp.os.msdos.djgpp |
Subject: | Re: Using cin.get() Outside Of main() |
Date: | Thu, 27 Feb 1997 19:41:57 GMT |
Organization: | Eidetic, Inc. : http://www.eidetic.com |
Lines: | 19 |
Sender: | -yp- AT bend91 DOT transport DOT com |
Message-ID: | <3315da3d.67224076@news.teleport.com> |
References: | <5f2ag5$l9m AT boursy DOT news DOT erols DOT com> <5f2u6v$1p6$1 AT thor DOT atcon DOT com> |
Reply-To: | plunket AT eidetic DOT com DOT anti-spam |
NNTP-Posting-Host: | bend91.transport.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
On Thu, 27 Feb 1997 03:23:21 GMT, ghost AT mail DOT atcon DOT com (Ghost) wrote: > donjr AT erols DOT com (No One Important) wrote: > >char FullName[256]; > >cout << "Enter Your Full Name\n:"; > >cin.get(FullName,256); > Well, if I am not mistaken cin.get() just grabs a character from the > buffer and eats it. I think, by looking at your code, you mean to use > the function cin.getline(). Nope, it will get "strings," too, of length specifed by the second parameter, up to but not including the third parameter (default is '\n'). Tom
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |