[Solved] std::ofstream won’t write to file (sometimes) [closed]

In an amazingly unsatisfying turn of events I voted to close my question. The problem was apparently caused by undefined behavior in unrelated code. And that because I did something that’s defined in C++11 but is not in C++03. Apparently you can’t call constructors from constructors in C++03…. Because of that, and because the question … 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”