delorie.com/archives/browse.cgi | search |
From: | "Paganini <Nathan E. Banks>" <paganini AT madisontelco DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Strings |
Date: | Sat, 6 Mar 1999 18:10:07 -0600 |
Organization: | Info Avenue Internet Services |
Lines: | 29 |
Message-ID: | <7bsg48$lak$1@news3.infoave.net> |
References: | <n6oPqIA6NS42Ewm8 AT dunvegan1 DOT demon DOT co DOT uk> <7brab6$cts$1 AT news3 DOT infoave DOT net> <ue8NjBAoGW42EwFm AT dunvegan1 DOT demon DOT co DOT uk> |
NNTP-Posting-Host: | ham117.madisontelco.com |
X-Trace: | news3.infoave.net 920765384 21844 206.28.233.117 (7 Mar 1999 00:09:44 GMT) |
X-Complaints-To: | usenet AT news3 DOT infoave DOT net |
NNTP-Posting-Date: | 7 Mar 1999 00:09:44 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.0810.800 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.0810.800 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Paul Richards <Paul AT dunvegan1 DOT demon DOT co DOT uk> wrote in message news:ue8NjBAoGW42EwFm AT dunvegan1 DOT demon DOT co DOT uk... >Paganini <Nathan E. Banks> writes, >>Actually, cin >> string_val DOES work...but a better way is to use >>string_val.Getline(). >> >>Check the <string> docs for other useful member functions like Read_token(). >I can get cin to work now but it count's spaces (32) as the end of line >character. Any way to change this to just CR (13)? > >And as for Getline I can get that to work at all with or without a >capital. Could you email me a demo program using it please? That's right...cin only reads up to teh next white space...I dunno why...maybe you can change it... heh heh...spoke too soon about read_token()...I guess it was a Borland extension...according to the C++ standard, the string class has a function getline (lowercase 'G') that reads a line up to a delemiter ('\n' I think) and stores it in the string. Paganini <Nathan E. Banks> MOOk, the Great High Llama ICQ 25308827 http:\\web.madisontelco.com\~paganini
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |