As I said in the comments of the code, you should not use srand() and rand(). I did it just to make it simple.

If you plan in getting random lines a lot of times, do not open and read the file everytime. Consider reading once, add them in a vector then everytime you need a random line, get it from the vector. You have everything there, including the lines count (the size of vector). Even better: made a struct with the 3 variables (iDayMap, iDayX, iDayY), and add those in the vector. This way, you won't have to do sscanf everytime. It will be faster.

Avoid defines (except include guards)

Try to define paths using / (forward slash) instead of \ (back slash) because of character escaping. It is easier, and works on every platform.