Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <fstream>
- #include <cstring>
- #include "storms.h"
- using namespace std;
- int main() {
- ifstream infile;
- cout << "Welcome to my Hurricane Program\n" << endl;
- infile.open("storms.txt");
- if(!infile)
- {
- cout << "File did not open! Program Exiting!!" << endl;
- return 0;
- }
- cout << left << setw(10) << "Name" << setw(10) << "Year" << setw(10) << "Month" <<
- setw(10) << "Type" << setw(10) << "Category" << setw(10) << "Max Wind Speed" <<
- endl;
- int MAX_STORMS = 26;
- STORM Storm[] = {};
- // while(!infile.eof()){
- //
- // cin >> Storm.NAME >> Storm.STORM_YEAR >> Storm
- // .STORM_MONTH >> Storm.STORM_DAY >> Storm.TYPE >>
- // Storm.STORM_CAT >> Storm.MAX_SPEED;
- // }
- // for (int i = 0; i < 26; i++){
- // cout << Storm.NAME << " " << Storm.STORM_YEAR << " " << Storm
- // .STORM_MONTH << Storm.STORM_DAY << " " << Storm.TYPE << " " <<
- // Storm.STORM_CAT << " " << Storm.MAX_SPEED << endl;
- // }
- // }
- //
- //initStorm("NAME", 1, 1, 1, "TYPE", 1, 1);
- fillStormList(Storm, infile);
- printStorm();
- //
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement