C++ / Need to create a calculator
<p>I need to create a program that asks for input from the user (Ex. 34+15-245+241) and calculates it. I've written a program that does this, but only works for single digits. </p>

<pre><code>#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;iostream&gt;

using namespace std;
class token { 
public: 
  char kind;
  char value;
};

int main(){
  vector&lt;token&gt; vt;
  char c;
  token t;
  while (cin&gt;&gt;c) {
    if (c=='=')
      break;
    if (c=='+' || c=='=')
      t.kind='0';
    else t.kind = '1';
      t.value=c;
    vt.push_back(t);
  }
  int res = vt[0].value-'0';
  for(int i=1; i&lt;vt.size(); i++)
  {
    if (vt[i].value=='+')
      res+=vt[i+1].value-'0';
    if(vt[i].value=='-')
      res-=vt[i+1].value-'0';
  }
  cout&lt;&lt;res;
  system("pause");
}
</code></pre>

<p>I know I have to do something with multiplying the digits by 10, but am unsure on how to go about it.</p>
