fork download
  1. #include<iostream>
  2. #include<fstream>
  3. #include<vector>
  4. #include<conio.h>
  5. using namespace std;
  6. int main()
  7. {
  8.  
  9. ifstream cin("input.txt");
  10. //ofstream cout("output.txt");
  11. vector<string> v;
  12. string str,str1;
  13. int x,i;
  14. while(getline(cin,str))
  15. {
  16. v.push_back(str);
  17. }
  18. for(i=0;i<=v.size()-1;i++)
  19. {
  20.  
  21. l:;
  22. cout<<"'Enter' for continue\n";
  23. x=_getch();
  24. if(x==13)
  25. {
  26. cout<<v[i]<<endl;
  27. }
  28. else
  29. {
  30. cout<<"Wrong\n";
  31. goto l;
  32. }
  33.  
  34. }
  35. return 0;
  36. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:18: fatal error: conio.h: No such file or directory
compilation terminated.
stdout
Standard output is empty