I\'m having trouble validating the existence of REGISTER.txt for input purposes in a function (see below). My understanding is that if the file doesn\'t exist, then the file won
REGISTER.txt is in the same directory as my .cpp file
REGISTER.txt needs to be in the same directory as the binary (build/Release or elsewhere depending on your build settings)
Normally it would be the directory where your program lives. If you want to make sure, use _getcwd to get the current directory or just include the parent directory.
char *_getcwd(
char *buffer,
int maxlen
);
However, you should try not to use the full path for the reason it might not be the same when you run your program on another computer.