title: C++: Getting character codes instead of letters when writing data to rich text box Text property
body: <p>I am new to C++ and working on a relatively ambitious Win32 application in Visual Studio. The problem I'm having is that a text field in the main window is displaying a number instead of a letter when 'writing' from a string. </p>
  
  <p>I'm reading a vector into a Rich Text Box, but instead of AA, the text box displays 6565. I understand that 65 is the character code for 'A', but haven't been able to find how to get the window to display the letter.</p>
  
  <p>This is the code that creates the vector. Debugging this piece shows that the data loads properly. This snippet of code is part of a 'portfolio' class.</p>
  
  <pre><code>vector&lt;string&gt; tickers;
  string cell;
  string line;
  
  ifstream d ("file.csv"); //The file contents look like: AA,AAPL,BAC and so on
  
  if (d.is_open()) {
  
      getline(d,line);
      stringstream line2(line);
  
      for (ci=0; ci&lt;c; ci++) { //c is known and is the number of 'columns' in the file I am reading.
        getline(line2,cell,',');
        tickers.push_back(cell);
      }
  }
  </code></pre>
  
  <p>The rich text box's name is "Results2".
  The code to set the Text property of the rich text box is:</p>
  
  <pre><code>portfolio p;
  int n = p.tickers.size();
  
  for (int i=0; i&lt;n; i++) {
      for (int j=0; j&lt;p.tickers[i].size(); j++) {
          Results2-&gt;Text += p.tickers[i][j];
      }
      Results2-&gt;Text += "\n";
  }
  </code></pre>
  
  <p>I know that the "Results2->Text" bit is correct, because the data is getting there just fine. The problem is, I end up with:</p>
  
  <p>6565
  65658076</p>
  
  <p>instead of:</p>
  
  <p>AA
  AAPL</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks in advance for any help!</p>