Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- using namespace std;
- typedef vector<string> VS;
- vector<VS> data1;
- //ofstream file3;
- //ifstream file4;
- VS source {
- "Plains/East/Northeast Severe Weather (June-July 2012)",
- "Severe Storm",
- "2012",
- "3264.0",
- "28",
- "Hurricane Isaac (August 2012)",
- "Tropical cyclone",
- "2012",
- "3122.8",
- "9",
- "Hurricane Sandy (October 2012)",
- "Tropical Cyclone",
- "2012",
- "73494.6",
- "159",
- "Western Wildfires (Summer-Fall 2012)",
- "Wildfire",
- "2012",
- "1964.6",
- "8",
- "U.S. Drought/Heatwave (2012)",
- "Drought",
- "2012",
- "33903.9",
- "123"
- };
- int main() {
- data1.reserve(20);
- int outer = 0,
- i = 0;
- while (i < 25) {
- for (int inner = 0; inner <= 4; ++inner) {
- data1[outer].push_back( source[i] );
- i++;
- }
- outer++;
- }
- int test = 2;
- for (i = 0; i <=4; ++i) {
- cout << data1[test][i] << "\n";
- }
- cout << "\n";
- getchar();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement