fork(3) download
  1. #include <fstream>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. ifstream fin("text.txt");
  8. if (!fin)
  9. {
  10. cout<<"Open file feil"<<endl;
  11. return 1;
  12. }
  13.  
  14. bool quote=false;
  15. while (fin)
  16. {
  17. char symb=fin.get();
  18. if(symb=='"') quote=!quote;
  19. if (quote||symb=='"') cout<<symb;
  20. }
  21. fin.close();
  22. cout<<endl;
  23. return 0;
  24. }
Runtime error #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Open file feil