Where to place file in order to read?

前端 未结 4 565
小鲜肉
小鲜肉 2021-01-20 01:20

Hey, where do I place a text file that I\'m trying to read using fstream? In this tutorial, http://www.gamedev.net/reference/articles/article1127.asp, they say

ifstr

4条回答
  •  无人共我
    2021-01-20 02:00

    input.txt should be in the working directory. Usually the working directory is the directory containing the executable. In the case of Visual Studio, the working directory when run in the debugger can be set in the Debug options.

提交回复
热议问题