Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. inp.open("grade_report.txt");
  2.    
  3.     if(inp.peek() == '\n' || inp.peek() == ch1)inp.ignore();
  4.     getline(inp,name,ch1);
  5.     s1.set_name(name);
  6.     if(inp.peek() == ch1)inp.ignore();
  7.     getline(inp,pid,ch1);
  8.     s1.set_pid(pid);
  9.     inp>>mess;
  10.    
  11.  
  12.     while(!inp.eof())
  13.     {  
  14.         while(inp.peek() == '\n'|| inp.peek() == ch2 || inp.peek() == ch1)inp.ignore();
  15.         getline(inp,course,ch2);
  16.         if(inp.peek() == ch2)inp.ignore();
  17.         getline(inp,grade,ch2);
  18.         if(inp.peek() == ch2)inp.ignore();
  19.         inp >> hours;              
  20.         s1.add_to_list(create_new(course,grade,hours));
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement