I have made a program, where I want to write some things on a file. When I do it directly from my main-function it works fine, but when i make this class member function, it fails to do that. std::cout works without a problem, and I don't receive any error message. It just doesn't write on the file. This is my code: