User Tag List

Results 1 to 5 of 5

Thread: C++

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    2

    Default C++

    Hello friends...

    Is it possible to check the files without using fstream in C and C++


    Web Development Services

  2. #2
    Nips away your dignity Fluffywolf's Avatar
    Join Date
    Mar 2009
    MBTI
    INTP
    Enneagram
    9 sp/sx
    Posts
    9,422

    Default

    In the general sense, sure. Depends on the files you need checking.
    ~Self-depricating Megalomaniacal Superwolf

  3. #3
    Junior Member LinearOrbit's Avatar
    Join Date
    Jun 2009
    MBTI
    INTJ
    Enneagram
    5w4
    Posts
    11

    Default

    You may be looking for fopen(). What are you trying to do?

  4. #4

    Default

    Quote Originally Posted by LinearOrbit View Post
    You may be looking for fopen(). What are you trying to do?
    Agree, fopen() is probably the easiest way to check if the files exist (depending if that is all you need). If it returns anything but NULL, it means the file is there. You have to fclose() the files you successfully fopen() during checking also.
    Freude, schöner Götterfunken Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum! Deine Zauber binden wieder Was die Mode streng geteilt; Alle Menschen werden Brüder, Wo dein sanfter Flügel weilt.

  5. #5

    Default

    You may want to try stat()

    Accept the past. Live for the present. Look forward to the future.
    Robot Fusion
    "As our island of knowledge grows, so does the shore of our ignorance." John Wheeler
    "[A] scientist looking at nonscientific problems is just as dumb as the next guy." Richard Feynman
    "[P]etabytes of [] data is not the same thing as understanding emergent mechanisms and structures." Jim Crutchfield

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO