fork download
  1. #include <fstream>
  2.  
  3. const static int N = 1000;
  4.  
  5. int main()
  6. {
  7. int lut[N][2];
  8.  
  9. std::ifstream f("input_file.txt");
  10.  
  11. int index = 0;
  12. while(!f.eof())
  13. {
  14. int l1 = 0;
  15. int l2 = 0;
  16.  
  17. f >> l1 >> l2;
  18.  
  19. lut[index][0] = l1;
  20. lut[index][1] = l2;
  21. ++index;
  22.  
  23. if (index == N)
  24. break; // WARN
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 2856KB
stdin
Standard input is empty
stdout
Standard output is empty