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

后端 未结 5 1163
生来不讨喜
生来不讨喜 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条回答
  •  囚心锁ツ
    2020-12-30 02:13

    If your current directory is changing, you should probably save your working directory at startup in some variable you can access later to set cwd back there. At least this is how I understand your question.

    For getting the cwd, this might help.

提交回复
热议问题