Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Problem with file i/o

Author: James Robertson

Date: 17:56:52 05/08/99

Go up one level in this thread


On May 08, 1999 at 17:42:57, James Swafford wrote:

>On May 08, 1999 at 15:11:01, James Robertson wrote:
>
>>I have several questions about files in MSVC: how do I delete files? Also, is
>>there a convenient way to tell a file's size with ifstream/ofstream? I have been
>>doing this:
>>
>>ifstream in;
>>in.open(file_path);
>>in.seekg(0, ios::end);
>>int size = in.tellg();
>>
>>But, this seems really nasty. Is there a better way?
>>
>>James
>
>
>To delete a file, just use the 'remove' command:
>
>remove("file.ext");
>
>I'm not sure how to tell a file's size...

Thanks anyway! At least now I don't have to manually delete all the garbage temp
files from my program's new bookmaking formula. :)

James

>
>--
>James



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.