Newbie Question with file handling with C

Hi

How can I obtain information such as file size, and file type of file openned with the fopen command??

Thanks a lot,

Juan Araya,
[email protected]

Comments

  • : Hi
    :
    : How can I obtain information such as file size, and file type of file openned with the fopen command??
    :
    : Thanks a lot,
    :
    : Juan Araya,
    : [email protected]
    :

    (i'm only about a year late answering this but...)

    just make a little counter to count all the characters like this...

    [italic]
    while(fgetc(myfile)!=-1)
    counter++;
    [/italic]

    "file type"?

    "We don't know where it came from... we can't imagine where it goes..."

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion