Article View: es.comp.os.linux.programacion
Article #6625Re: EOF de iostream
From: Ali
Date: Fri, 30 May 2003 13:35
Date: Fri, 30 May 2003 13:35
25 lines
2102 bytes
2102 bytes
llamaras el metodo eof() no? "Javicho" <javicho@enfrente.de.ordenador> escribi๏ฟฝ en el mensaje news:3ebf7952@news.upm.es... > Hola, > > Tengo una clase que hace operaciones con ficheros de texto, para acceder a > ellos uso la clase iostream. > > Pues bien ultimamente he observado un problema al detectarme el fin de > fichero. > > Cuando hay que leer fichero generados desde un programa no hay problema, el > problema esta al leer ficheros generados a mano, he probado con > vi, emacs, kate.. > > El problema es que si la ultima linea es ***************** > al leerla con getline, y hacer despues un if eof siempre me dice que no ha > alcanzado fin de fichero, getline vuelve a ser llamada, y es entonces > cuando tras leer basura y no funcionarme para nada encuentra por fin el fin > de fichero, sabe alguien porque es? >
Technical Details
Message-ID:
<1054301755.587732@seux119>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed1.eu.ignite.net!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-peer0!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!not-for-mailReferences:
<3ebf7952@news.upm.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,5a4810fa27925ca9 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-05-30 06:36:29 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed1.eu.ignite.net!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-peer0!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!not-for-mail From: "Ali" <alunaro@eresmas.com> Newsgroups: es.comp.os.linux.programacion Subject: Re: EOF de iostream Date: Fri, 30 May 2003 15:35:45 +0200 Organization: Supercable Andalucia, S.A. Lines: 27 Message-ID: <1054301755.587732@seux119> References: <3ebf7952@news.upm.es> NNTP-Posting-Host: 212.79.128.146 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: titan.bt.es 1054300485 1747 212.79.128.146 (30 May 2003 13:14:45 GMT) X-Complaints-To: abuse@bt.es NNTP-Posting-Date: 30 May 2003 13:14:45 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Cache-Post-Path: seux119!unknown@cliente-217217161172.ubrseb01.supercable.es X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)