Advertisement
AbraaoAllysson

write - LOG

Jun 17th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. void write(string str, string IP)
  2. {
  3.      mutex.lock(); //sem_wait(&semaph);
  4.  
  5.   ofstream myfile;
  6.      myfile.open ("example.txt");
  7.    myfile << "IP: \n\n" << IP[0]
  8.           << "\n\n", <<str[0]);
  9.       myfile.close();
  10.     mutex.unlock(); // sem_post(&semaph);
  11.    
  12.    
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement