You didn't create an object in WriteFile, modify line 4 to ofstream* f = new ofstream;
In the same function you aren't using the filename argument
In WriteLine you don't need to call c_str()String should be string (no capital S)
(i disabled the string to make sure it was not the string class causing the problem. String is actually a typedef of irrlichts' irr::core::stringc. This was also cayusing a problem so i am back to string. :)
I also added delete file to closefile is this right? or does .close do this for me? )I have no errors using delete :/