Delete chars in a file stream
How can I remove/delete the last n characters from a fstream object?
Re: Delete chars in a file stream
On Jun 13, 10:40 am, "Bernie" <indico(at)gmx-topmail.de> wrote:
> How can I remove/delete the last n characters from a fstream object?
First of all, of course, an fstream doesn't contain any
characters; it is only an interface to an external file which
contains the characters. But there's no standard way of
truncating a file, either (and some OS's don't support it at
all). The usual solution is to copy the file to a new file,
without copying what shouldn't be copied. There will often be
an OS specific means of truncating the file as well, but you
can't use it on an fstream; you'll have to check with your OS
documentation for more information there.
James Kanze (GABI Software) email:email@example.com
Conseils en informatique orient�e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S�mard, 78210 St.-Cyr-l'�cole, France, +33 (0)1 30 23 00 34
|All times are GMT. The time now is 12:56 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.