[Solved] C++ cin don’t work properly [closed]
The line World(height, width); constructs a temporary object and discards it. The member variable of the current object never get initialized properly. Simplify your code. Move the code to get input data to the function that calls it. For example, use it in main. int width = -1; int height = -1; cout << “Aby … Read more