How do I set the working directory to the “solution directory” in c++?

后端 未结 5 1190
生来不讨喜
生来不讨喜 2020-12-30 02:01

I want to set the current directory to the solution diretory/configuration name. How do I do that? Can I use the global variables somehow?

Edit: I am trying to read a

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 02:32

    Have you tried using the environment variable $(SolutionDir) ?

    With reference to this thread here.

    Also, hopefully the version of VS does not matter, but this answer is furnished based on the assumption that the platform is VS2005.

    Hope this helps.

提交回复
热议问题