Question #22
-
How do I specify the path, where filename.json will be searched for? P.S. I'm also wondering, why this warning appears: Besides that warning, I had a couple of errors about std::min in the library. After changing them to min (I'm using namespace std", those errors are gone. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
The library does not manage any search paths, it would be application-specific which search paths to use, from which environment variable to take search paths etc. Usually all file access is relative to the current working directory of the application, i.e. the directory that the application was launched from. Regarding the warning about |
Beta Was this translation helpful? Give feedback.
-
The issues with |
Beta Was this translation helpful? Give feedback.
-
Thanks for the minmax solution. I'll try it later. Is this |
Beta Was this translation helpful? Give feedback.
-
You need to be careful with escape sequences. If you want the filename to be the string |
Beta Was this translation helpful? Give feedback.
-
I've also just committed a change to protect against min/max macros, so the master branch should work even without |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
You're welcome. Please test if your problems are solved (we are not Windows-users ourselves), feel free to re-open this issue if the fix is not working for you. |
Beta Was this translation helpful? Give feedback.
-
I've just replaced the files and it worked without any warnings or errors. |
Beta Was this translation helpful? Give feedback.
You need to be careful with escape sequences. If you want the filename to be the string
c:\filename.json
, you need to escape the\
, your source code should thus contain"c:\\filename.json"
(note: a double backslash).