title: Extract a floating point number from a CString
body: <p>I want to extract a floating point number from a CString formatted as: (example extract 22.760348)</p>
  
  <pre><code>Incidence_angle(inc)[deg]                 :22.760348
  </code></pre>
  
  <p>Basically I am reading a plain text file containing some parameters, and I want to perform some calculations on the values. I read the file using a CStdioFile object and extracting each line using the readString method as follows:</p>
  
  <pre><code>CStdioFile result(global::resultFile,CFile::modeRead);
  while( result.ReadString(tmp) )
              {
                  if(tmp.Find(L"Incidence_angle(inc)[deg]") != -1)
                  {
                      //extract value of theeta i here
                      // this is probably wrong
                      theeta_i = _tscanf(L"Incidence_angle(inc)[deg]  :%f",&amp;theeta_i);
                  }
              }
  </code></pre>
  
  <p>I tried using scanf because I couldnt think of any other way.</p>
  
  <p>I apologize if this question seems very basic and stupid, but I have been stuck on it for a long time and would apppriciate some help.</p>
  
  <p>edit: took out the proof of concept program I wrote, caused confusion</p>