<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Buenas gente lo hago simple y rapido para ver si me pueden ayudar. Tengo este codigo:</p>
<p><span id="ms-rterangepaste-start"></span></p>
<pre class="cpp geshi" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339900;">#include <fstream></span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339900;">#include <string></span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">int</span> main<span style="color: #008000;">(</span><span style="color: #008000;">)</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">{</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    std<span style="color: #008080;">::</span><span style="color: #007788;">ifstream</span> file<span style="color: #008000;">(</span><span style="color: #FF0000;">"NomFichero.txt"</span><span style="color: #008000;">)</span><span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> linea<span style="color: #008080;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000ff;">while</span> <span style="color: #008000;">(</span>std<span style="color: #008080;">::</span><span style="color: #007788;">getline</span><span style="color: #008000;">(</span>file, linea<span style="color: #008000;">)</span><span style="color: #008000;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">}</span></div></li></ol><p>Como puedo hacer para que linea no guarde solo lo ultimo que lee si no que</p><p>lea una linea y guarde lea otra y guarde y asi sucesivamente. Gracias<br></p></pre>
<span id="ms-rterangepaste-end"></span><br>
<p></p>
</div>
</body>
</html>