Reading a specifig value in a config.ini file and write it to a variable in C++
<p>I need a function to read a specifig value in a config.ini file and write it to a variable</p>

<p>the valuse in the config.ini is an ip.address ( this ip address could be any ip address defined by the user in the ini file)</p>

<p>example of my simple config.ini file:</p>

<pre><code>[hostAddress]
ipaddr = 192.168.0.181
</code></pre>

<p>thats all.</p>

<p>the variable that should have the ipaddr value from the config.ini file is  the char *ipaddr variable as seen in this code below</p>

<pre><code>#include "settings.h"


char *ipaddr = "xxx.xxx.x.xxx";


namespace iocp {
SettingsData::SettingsData()

  :
  IOCP_Port(8092) {
    hostAddress.s_addr = inet_addr(ipaddr);
}

SettingsData Settings;

}   // end namespace iocp
</code></pre>
