1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to read file names in a directory as string?

Discussion in 'C' started by ahrouhi, Jul 6, 2011.

  1. ahrouhi

    ahrouhi New Member

    Joined:
    Mar 11, 2011
    Messages:
    24
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Student/Research
    Location:
    Melbourne
    Thanks, yes sprintf does work for me.
     
  2. ahrouhi

    ahrouhi New Member

    Joined:
    Mar 11, 2011
    Messages:
    24
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Student/Research
    Location:
    Melbourne
    Below is a very simple line of codes in C which tries to open a file which does not exist in the path. The compiler does not rises any error but i have an strange error in run time as can be seen in below image. whats the reason?
    [​IMG]
     

Share This Page