fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <fstream>
  4. #include <string>
  5. #include <ctime>
  6. #include <vector>
  7. #include <memory>
  8. using namespace std;
  9.  
  10.  
  11. void apaga_espaco(ifstream& tab, vector<time_t> t) {
  12. string nome = "gremio";
  13. int saldo = 0;
  14. int vit = 1, i = 0;
  15. string s;
  16. char N;
  17. while (tab.good()) {
  18. i++;
  19. getline(tab, s);
  20. s.erase(0, 29);
  21. N = s.find(':');
  22. s.erase(0, N + 6);
  23. }
  24. }
  25.  
  26. int main() {
  27. vector<time_t> t(20);
  28. ifstream tabe;
  29. char N;
  30. string s;
  31. tabe.open("Tabela.txt", ios::in);
  32.  
  33. if (!tabe.is_open()) {
  34. cout << "Arquivo nao encontrado, erro fatal!";
  35. exit(1);
  36. }
  37. apaga_espaco(tabe, t);
  38. }
Runtime error #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
Arquivo nao encontrado, erro fatal!