I have a problem using fopen () with a relative path. I wanted to use fopen as follows:
fopen("\\Saurabh\\pqrs.txt");
I get filePointer as null.
The situation arose because I was trying to create an installation or deployment project that should read files. The default file paths after the user completes the setup are C: \ Program Files \ Setup .. (where exe is reset). Therefore, I dumped the files in one folder and gave the path (fixed path or hard code) to those files in the program.
If the user selects a different installation path, the program does not work.
Can this be fixed?
source share