title: Reading variables from a text file C++
body: <p>For my robotics team I was tasked with writing a function that would allow us to store variable values in a text file so that we could update values without having to update the code. example: increasing the wheel speed. the format we have decided on is; whitespace or #, variable name, whitespace, variable value.</p>
  
  <pre><code> variable1 1
  #variable3 4
   setspeed 10
  </code></pre>
  
  <p>What I need to do is as a variable is needed my function would search the first column for the variable requested and return it. it has been recommended that I use fgets to read line by line but I am unsure as to how I would break up the line using our format. </p>