writting to file

Hi again! :)

I have this function

1
2
3
4
5
6
7
8
9
10
11
12
void ZAPIS_PLAYERLOOSE(string myguild,string path){
     fstream guild;
     string strin;
     guild.open(myguild.c_str());
     for(0;strin!="FEFIGHTEND";0){
                             guild>>strin; if(strin=="FEFIGHTEND") break;
                             }
     guild.close();
     guild.open(myguild.c_str());
     guild<<endl<<path;
     guild.close();
}


In this function I want the program to write my nick (path) to the next line of sentence FEFIGHTEND which is already in that file (guild).

This sentence is in the end of file so I also tried guild.seekg(0,ios::end); but it didn`t go to the end of the file.

So I did it like it si upper but it didn`t writed there my nick. Can someone help me with this??

thank you very much!
yes, thanks :) a hve forgotten that flag :D
Topic archived. No new replies allowed.