Running My C++ Code Gives Me a Blank Console

Running my C++ code gives me a blank console

Note: this issue is also being reported by gcc/mingw/cygwin users.

Do you use Avast antivirus? If so, try disabling it and then test your program. There have been several similar questions on SO recently and Avast was the problem.

If that fixes the problem I suggest you add an exclusion for your "\Visual Studio 2015\Projects" directory instead of completely disabling your antivirus. You could also file a bug report with Avast or try a different antivirus.

C++ Console is blank when program is run

Modify you read_board() to

   void read_board(square b[]) {
ifstream infile;
infile.open("game.txt");
int square_number, square_move;
string square_message;
char square_symbol;
while (infile >> square_number >> square_move >> square_symbol) {
getline(infile, square_message);
if (square_number < board_length) {
b[square_number].set(square_move, square_symbol, quare_message);
}
}
}


Related Topics



Leave a reply



Submit