title: Smiley face when assigning improper value type to struct property!
body: <p>I am somewhat wondering if I am losing my mind, but I swear to you, this code outputs smiley faces as the .name values!! what in the world is going on? Thus far it seems to only work when the value is 1, anything else properly gives errors.</p>
  
  <p><em>I realize the code is flawed -> I do not need help with this.</em></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;regex&gt;
  #include &lt;string&gt;
  #include &lt;list&gt;
  
  using namespace std;
  using namespace tr1;
  
  
  struct CollectedData
  {
  public:
      string name;
      float grade;
  
  };
  
  int main()
  {
      string line;
      list&lt;CollectedData&gt; AllData;
      int count;
  
      ifstream myFile("test_data.txt");
      if (myFile.fail()) {cout &lt;&lt; "Error opening file"; return 0;}
      else
      {
          cout &lt;&lt; "File opened... \n";
          while( getline(myFile, line) ) {
              CollectedData lineData;
              lineData.name = 1;
              lineData.grade = 2;
              AllData.push_back(lineData);
          }
      }
  
      cout &lt;&lt; "\n\n File contents: \n";
  
      list&lt;CollectedData&gt;::iterator Iterator;
      for(Iterator = AllData.begin(); 
              Iterator != AllData.end();
              Iterator++)
      {
          cout &lt;&lt; "\t" &lt;&lt; (*Iterator).name &lt;&lt; " - ";
          cout &lt;&lt; "\t" &lt;&lt; (*Iterator).grade &lt;&lt; "\n";
      }
  
  
      getchar();
      return 1;
  }
  </code></pre>
  
  <p><a href="http://img21.imageshack.us/img21/4600/capturekjc.jpg" rel="nofollow noreferrer">:-) http://img21.imageshack.us/img21/4600/capturekjc.jpg</a></p>
  
  <p><strong>I KNOW THAT THE CODE IS USELESS, <br>
  I WANT TO KNOW WHY IT IS GIVING ME SMILEY FACES INSTEAD OF ERRORS</strong></p>
  
  <p><em>comforting. . . mocking</em></p>