Advertisement
CD503

MAIN CPP

Nov 29th, 2024
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <fstream>
  4. #include <cstring>
  5. #include "storms.h"
  6.  
  7. using namespace std;
  8.  
  9. int main() {
  10.  
  11. ifstream infile;
  12. cout << "Welcome to my Hurricane Program\n" << endl;
  13. infile.open("storms.txt");
  14. if(!infile)
  15. {
  16. cout << "File did not open! Program Exiting!!" << endl;
  17. return 0;
  18. }
  19. cout << left << setw(10) << "Name" << setw(10) << "Year" << setw(10) << "Month" <<
  20. setw(10) << "Type" << setw(10) << "Category" << setw(10) << "Max Wind Speed" <<
  21. endl;
  22. int MAX_STORMS = 26;
  23. STORM Storm[] = {};
  24.  
  25. // while(!infile.eof()){
  26. //
  27. // cin >> Storm.NAME >> Storm.STORM_YEAR >> Storm
  28. // .STORM_MONTH >> Storm.STORM_DAY >> Storm.TYPE >>
  29. // Storm.STORM_CAT >> Storm.MAX_SPEED;
  30. // }
  31. // for (int i = 0; i < 26; i++){
  32. // cout << Storm.NAME << " " << Storm.STORM_YEAR << " " << Storm
  33. // .STORM_MONTH << Storm.STORM_DAY << " " << Storm.TYPE << " " <<
  34. // Storm.STORM_CAT << " " << Storm.MAX_SPEED << endl;
  35. // }
  36. // }
  37. //
  38. //initStorm("NAME", 1, 1, 1, "TYPE", 1, 1);
  39. fillStormList(Storm, infile);
  40. printStorm();
  41. //
  42.  
  43.  
  44. return 0;
  45. }
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement