Advertisement
s1ay3r44

Load code error

Jun 27th, 2011
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. void load_join_date(int * day, int * month, int * year)
  2. {
  3.     stringstream holder;
  4.     string mystring;
  5.     ifstream myfile("data.bin");
  6.     if(myfile.is_open())
  7.     {
  8.         getline (myfile, mystring);
  9.         holder << mystring;
  10.         holder >> *day;
  11.         cout << *day << "\n";
  12.         holder.str(std::string());
  13.         getline (myfile, mystring);
  14.         holder << mystring;
  15.         holder >> *month;
  16.         cout << *month << "\n";
  17.         holder.str(std::string());
  18.         getline (myfile, mystring);
  19.         holder << mystring;
  20.         holder >> *year;
  21.         cout << *year << "\n";
  22.         holder.str(std::string());
  23.         myfile.close();
  24.     }
  25.     return;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement