0

I've created them first in /tmp, and executed and nothing. Then in /home and again nothing. I also tried to explicitly close the files with file.close();... Yeah I think that something's wrong with the kubuntu. Many thanks though :-)

1

I meant that you should write ofstream file("/tmp/F1.txt",ios::trunc);
Not sure if that's what you did.

0

Yes, I did exactly that. I also tried it in /home/ directory but no luck.

0

Actually don't bother. I think the problem is my kubuntu (or the virtual box or something). Because I executed this simple test and it didn't worked:

#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main()
{
        string message = "Testing";

        ofstream out("file1.txt", ios::trunc);

        out << message << endl;

        out.close();

        return 0;
}

Thanks for all your help, and sorry if i was a pain :-)

Edited by didi00: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.