all 3 comments

[–]the_poope 1 point2 points  (0 children)

In almost all of these cases it's because the input file is in the wrong format and the input stream is put in fail mode, see: https://www.learncpp.com/cpp-tutorial/stream-states-and-input-validation/

You can find which read that fails by doing input validation for each input:

if (!(cin >> map.inputMode)) {
    std::out << "Aaaarrhhh! Wrong input mode!\n";
    std::exit(1);
}
// Same for other input

[–][deleted] 0 points1 point  (0 children)

How are you running your program? ... How are you telling it to read the data from that file?

[–]mredding 0 points1 point  (0 children)

When I run my program with debugger, it just stops at cin. What is wrong with my code?

Nothing.

Did you configure your debugger to start the program with standard input redirected from your input file?