Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cstdlib>
  4. #include <cstring>
  5.  
  6. #include "Criminal.h"
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     char Name[30];
  13.     char Crime[30];
  14.     int Months;
  15.     int Cell;
  16.    
  17.     typedef char* Ptr;
  18.    
  19.     Ptr crimPtr[200];
  20.    
  21.     ifstream ifs;
  22.     ifs.open("crims.txt"); // name of file is hardcoded so no error checking needed
  23.    
  24.     ifs >> Name;
  25.     cout << Name << endl;
  26.     Ptr = new(nothrow) Criminal(Name, Crime, Months, Cell);
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement