fork(2) download
  1. #include<iostream>
  2. #include<string>
  3. #include<conio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. setlocale(LC_ALL, "Russian");
  10.  
  11. string previous = "The cat cat jumped ";
  12. string current;
  13. while (cin >> current) {
  14. if (previous == current) {
  15. cout << "повторяющееся слово: " << current << "\n";
  16. previous = current;
  17. }
  18. }
  19.  
  20. _getch();
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:18: fatal error: conio.h: No such file or directory
compilation terminated.
stdout
Standard output is empty