Advertisement
Guest User

Untitled

a guest
May 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. void task10() {
  2.     fstream file;
  3.     string in_line;
  4.     file.open("2.txt");
  5.     int count = 1;
  6.     time_t seconds = time(NULL);
  7.     tm* timeinfo = localtime(&seconds);
  8.     while (getline(cin, in_line)) {
  9.         cout << "PID "<<_getpid() << endl << "NAMBER "<<count<<endl << "DATA "<<asctime(timeinfo) << endl;
  10.         count++;
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement