title: C++ retrieve numerical values in a line of string
body: <p>Here is the content of txt file that i've managed read.</p>
  
  <pre><code>X-axis=0-9
  y-axis=0-9
  location.txt
  temp.txt
  </code></pre>
  
  <p>I'm not sure whether if its possible but after reading the contents of this txt file i'm trying to store just the x and y axis range into 2 variables so that i'll be able to use it for later functions. Any suggestion? And do i need to use vectors? Here is the code for reading of the file.</p>
  
  <pre><code>string configName;
  ifstream inFile;
  
  do {
  
      cout &lt;&lt; "Please enter config filename: ";
      cin &gt;&gt; configName;
  
      inFile.open(configName);
  
      if (inFile.fail()){
  
          cerr &lt;&lt; "Error finding file, please re-enter again." &lt;&lt; endl;
          }
      } while (inFile.fail());
  
  string content;
  string tempStr;
  while (getline(inFile, content)){
  
      if (content[0] &amp;&amp; content[1] == '/') continue;
      cout &lt;&lt; endl &lt;&lt; content &lt;&lt; endl;
  </code></pre>