I have a problem with my C++ console program. I need some dictionary files for some translations. So I read this Files in the program and gave them a indirect path to the program folder.
String="translation\PfadzuDatei\Datei.txt";
In Debugging-Mode this works great, because VS starts the program in the right directory, but when i release it, and it is called from somewhere else like:
Path of Program: c:Program.exe
And i start it from: another position:
C:anyPathInConsole>c:Program.exe arg1
The program is not able to find the translation files.
Is there any other possibility to set the Path to the files in other ways or do i have to call the program from C:
The problem with calling the program from the specific folder is, that the program is started by a nodejs "Child-Prozess" exec function and i don`t know the executing Path.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…