How to open a text file that's not in the same folder?

前端 未结 3 524
故里飘歌
故里飘歌 2021-01-26 05:28

Since C it\'s not a language I am used to program with, I don\'t know how to do this.

I have a project folder where I have all the .c and .h files and a conf folder unde

3条回答
  •  自闭症患者
    2021-01-26 06:28

    The location of your .c and .h files is not really the issue; the issue is the current working directory when you run your executable.

    Can you not pass in the full path to the fopen() function?

提交回复
热议问题