title: Loading a string from a config file in MFC
body: <p>I have installed Postgres database and I am trying to connect to it from C++ code (VC++). Instead of passing hard-coded values to the Connect function (<em>edit: <code>PQconnectdb</code>?</em>), I would like to write a config file and read the values and send it to connect function. </p>
  
  <p>How can I do it in vc++? Please help me.</p>
  
  <pre><code>CString Connect= _T("host=x.x.x.x port=5432 dbname=xxxxxx user=cdfvv password=hccjjj"); 
  </code></pre>
  
  <p>Instead of assigning value like this, I would like to write a config and process it.</p>