On Tue, Aug 5, 2008 at 5:42 PM, mano M <[EMAIL PROTECTED]> wrote: > How can we replace with same length of line. After reading one line , decided > to replace > it with same length, But this time file pointer is on the next line .
Save the pointer before you change it. Pseudocode: size_t old_pos = filepos(fp); // write data. seek(fp, old_pos); You're back to where you started, but with an updated file. -- PJH 'Two Dead in Baghdad' not 'product-friendly' - Kent Ertugrul, chief executive of Phorm. http://shabbleland.myminicity.com
