[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

[Solved] can’t understand “std::cout”

The code presented by you in a C++ program. You need to save it in file.cpp format, after that you need to compile with g++ file.cpp and it should work. You have saved it file.c format and compiling it with gcc, which is C standard, not C++. solved can’t understand “std::cout”