I’m sorry for this no-brainer question but I’m having difficulties reading the JUCE documentation.
I want to retrieve the working directory and use it for FileIO handling.
I tried the getCurrentWorkingDirectory() and I expected this to return a string containing the path to my compiled exe-file which I would then concatenate with my filename when creating the file; as such:
getCurrentWorkingDirectory() returns a File object representing the directory so you need to get the path name from it first using getCurrentWorkingDirectory().getFullPathName(). You should then be able to concatenate it as you are doing.
You also need to make sure you declare the path as a string:
String filePath = File::getCurrentWorkingDirectory().getFullPathName();
myFile = new File(filePath + T("temp.txt"));