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
What Xml Parser Should I Use in C++
"Using Namespace" in C++ Headers
Why Do I Need Strand Per Connection When Using Boost::Asio
How to Declare an Interface in C++
Detecting Endianness Programmatically in a C++ Program
Function Does Not Change Passed Pointer C++
Implementation C++14 Make_Integer_Sequence
What Is the Bit Size of Long on 64-Bit Windows
When to Use References Vs. Pointers
Reflection and Refraction Impossible Without Recursive Ray Tracing
How to Concatenate a Std::String and an Int
Can a Class Member Function Template Be Virtual
Is Cout Synchronized/Thread-Safe
Why Do People Say There Is Modulo Bias When Using a Random Number Generator