steamengines

Lab 4

Sep 23rd, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. // Christian Ballard
  2. // COSC 1337
  3. // 9/21/15
  4. // Lab  4 - Structures, Arrays, and Vectors
  5.  
  6. #include <iostream>
  7. #include <string>
  8. #include <fstream>
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     string fileName = "Lab4a_data.txt";
  14.     ifstream fin (fileName);
  15.    
  16.     fin.open(fileName);
  17.  
  18.     string firstName[41];
  19.     string middleName[41];
  20.     string lastName[41];
  21.     int ageElected[41];
  22.     string stateOfBirth[41];
  23.  
  24.    
  25.     while (getline(fin, firstName[0], ':'));
  26.     {
  27.         cout << firstName[0];
  28.     }
  29.     while (getline(fin, middleName[0], ':'));
  30.     {
  31.         cout << middleName[0];
  32.     }
  33.  
  34.     system("pause");
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment