C/Visual C - RECORRER ARCHIVO con IFSTREAM

 
Vista:

RECORRER ARCHIVO con IFSTREAM

Publicado por ismael (2 intervenciones) el 06/02/2007 23:17:15
hola, tengo un archivo de texto con n lineas, las cuales recorro con un objeto ifstream, una vez llegado al EOF necesito recorrer nuevamente el archivo de la misma forma, para ello cierro y abro nuevamente el file, no existe alguna forma de ir al principio y asi no evitar el cerrar el archivo?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:RECORRER ARCHIVO con IFSTREAM

Publicado por fernando.gomez (1603 intervenciones) el 10/02/2007 05:07:37
Sip. emplea ifstream::seekg.

std::ifstream strm;

// haces lo que sea con strm
strm.seekg(0); // regresa a la primera posición

http://www.cplusplus.com/reference/iostream/istream/seekg.html
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

My Dear, Good News

Publicado por +22501681379 (1 intervención) el 08/06/2007 14:37:30
My Dear, Good News

I write to seek your services in a private confidential matter

regarding to a great late [Mr. Matthew Brain] who died leaving some funds unclaimed in our bank without any beneficiary. I am aware that you might not be related to him but I want you to stand As the beneficiary and I will fill you in, since I have all the details for The transfer proper.This requires a private arrangement. Could you Perhaps be able to receive these funds under legal claims then I will Fill you in I am willing to give you 40% at the conclusion of this business.

I will need you in legal capacity to stand as his beneficiary. I have all the Details and will fill you in if you are really willing. Your major role would Be either provides me with an Existing account or to open a bank account Where the funds will be transferred.

All correspondences will be via email for now. The funds in question are Quite large (About $22M USD). I will expect a straight answer from you. YES or NO. If yes, then let's work out the modalities and a brief profile of Your person is expected. Contact me immediately through my private email ([email protected]) for details of the business.
Closing with anticipation.

Mr. Peter Emma

1 your full name and age:.............................................
2 yourfull address:...........................................
3 phone:...............................................
4 fax/:..........................................................
5 the name of your company (if any):.............................
6 web:..........................................................

Mr. Peter Emma
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar