title: C++ Precedence via filing
body: <p>I want to solve this type of expressions after reading from filing with precedence
  <br>
  <strong>2+3/5*9+3-4</strong>
  <br>
  Here is my code for attempt to solve that task how can i solve this problem</p>
  
  <pre><code>while ( !inputFile.eof() ) {
    getline( inputFile, read );
    cout &lt;&lt; read &lt;&lt; endl;
    for ( int i = 0; i &lt; read.length(); i++ ) {
      if ( read[i] == '/' ) {
        result = static_cast&lt;float&gt;(read[i - 1]) / static_cast&lt;float&gt;(read[i + 1]);
        read[i - 1] = result;
        for ( int j = i; j &lt; read.length() - 2; j++ ) {
          read[j] = read[j + 2];
        }
        read[read.length() - 1] = '\0';
        read[read.length() - 2] = '\0';
      }
    }
    cout &lt;&lt; result &lt;&lt; endl;
    cout &lt;&lt; read &lt;&lt; endl;
  }
  </code></pre>