🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.c++
Article #43

Leer caracteres

#43
From: num11
Date: Mon, 13 Oct 2008 04:55
15 lines
1700 bytes
Saludos a todos, tengo un problema:
quiero leer una secuencia (arreglo ) de caracteres hasta que no se de
un "F", es decir, algo así:
i=0;
do{
  scanf("%c",&c[i]);
   j=i;
   i++;
}while(c[j]!='F')

pero el problema es que hasta que no de un "enter" no me lee el
caracter en "X" posición, lo que quiero es que me vaya leyendo los
caracteres sin tener que dar el "enter", y que cuando escriba la "F"
automáticamente (sin dar enter) finalice el programa. Alguna idea?? De
antemano, gracias!.
Technical Details
Message-ID: <e30b42cf-4483-46ce-910a-86fdfcb5d51f@b1g2000hsg.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!b1g2000hsg.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f53ec,41024634405f2e4f,start
X-Google-Attributes: gidf53ec,domainid0,public,usenet
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!b1g2000hsg.googlegroups.com!not-for-mail
From: num11 <quintos_11@hotmail.com>
Newsgroups: es.comp.lenguajes.c++
Subject: Leer caracteres
Date: Sun, 12 Oct 2008 21:55:02 -0700 (PDT)
Organization: http://groups.google.com
Lines: 16
Message-ID: <e30b42cf-4483-46ce-910a-86fdfcb5d51f@b1g2000hsg.googlegroups.com>
NNTP-Posting-Host: 189.131.195.174
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1223873702 23013 127.0.0.1 (13 Oct 2008 04:55:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 13 Oct 2008 04:55:02 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: b1g2000hsg.googlegroups.com; posting-host=189.131.195.174; 
 posting-account=-JmrNAoAAAAvoWvdyvNe1qJRDYTCTMeQ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
 1.1.4322; .NET CLR 2.0.50727; WinuE v6; InfoPath.2; WinuE
 v6),gzip(gfe),gzip(gfe)