title: Read options from file
body: <p>I would like to write a function which will read values from a text file and write them to variables. For example my file is:</p>
  
  <pre><code>mysql_server localhost
  mysql_user root
  mysql_passworg abcdefg
  mysql_database testgenerator
  log log.txt
  username admin
  password abcd
  </code></pre>
  
  <p>and I have the same variables as the first word in the line. 
  So how to make the function read data from file and do sth like this:</p>
  
  <pre><code>char *mysql_server = localhost;
  char *mysql_user = root;
  ...
  </code></pre>
  
  <p>I have no idea even how to start writing it... </p>