title: C++ reading files into class variables```
body: <p>Say i have a text file like with several lines like this</p>
  
  <pre><code>H 2012/08/05 20 13   Homework 1
  Q 2012/08/07 10 8.5  Quiz 1
  L 2012/08/05 5  3    Lab 1 Attendance
  </code></pre>
  
  <p>The beginning letters represent (H) Homework, (Q or E) Quiz/Exam, and (L) Labs
  I want to read each value into a corresponding class variable and then sort them alphabetically before printing them out into their own categories:
  Here's the class i've set up.</p>
  
  <pre><code>class Assignment
  {
   private:
          char Assignment_type;
          string Date;
          int Max_score;
          float Actual_score;
          string Assignment_name;
   public:
         Assignment();
  }
  </code></pre>
  
  <p>Obviously i haven't written the functions to return the values or the default constructor yet, I really just need some help figuring out how to read from the file into the correct variables first.</p>
  
  <p>Once read in i need to be able to sort them alphabetically before printing them out into their corresponding category's.</p>
  
  <p>How do I sort this kind of data alphabetically after reading it into the correct variables?</p>