Re: How to Truncate a file opened by fopen()



On Thu, 16 Sep 2004 18:48:31 +0530, Harsha Kodnad
<harsha km tallysolutions com> wrote:
    How can I truncate  a file opened by fopen() ?

    If I want to extend my file or truncate my file I have to use ftruncate, but ftruncate takes int (file 
descriptor) is there any function which takes FILE * ?

use fileno() to get the file descriptor out of FILE



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]