mira los fuentes del unreal, hay una solucion completamente portable. Yo por otra parte hice la mia propia un dia q la necesitaba para alguna chorrada:
namespace conf
{
typedef std::string st;
typedef st::size_type sz_t;
typedef std::map<st,st> Vars;
typedef std::map<st,Vars> ini_t;
typedef const st c_st;
typedef char const * const ccc;
enum { BUFF = 256 , CTAG = ';'};
class IniFile: public ini_t
{
typedef std::vector<st> ArgList;
bool isws (char c,ccc wstr){return strchr(wstr,c)!=0;}
st trim(c_st &s,sz_t &idx,ccc ws= " "){
sz_t i = s.find_first_not_of(ws,idx);
sz_t j = idx = s.find_first_of(ws,i);
return st(s.substr(i,j-i));
}
void stk (ArgList &l,c_st &s,ccc ws = " \r\t\n"){
sz_t i = 0;l.clear();
while (i<s.size())l.push_back(trim(s,i,ws));
}
public:
IniFile(ccc f= 0){ if(f)readvars(f); }
bool readvars(c_st& file)
{
char b[BUFF];
st secc;
ArgList a;
ifstream f(file.c_str(),ios::in|ios::nocreate);
f.getline(b,BUFF);
while(f.good())
{
stk(a,b," \t\r\n=");
if(a.size() && a[0][0]!=CTAG)
if(a[0][0]=='[') secc=a[0].substr(1,a[0].size()-2);
else (*this)[secc][a[0]]=a[1];
f.getline(b,BUFF);
}
return f.bad();
}
};
};
int main(int argc, char* argv[])
{
conf::IniFile a("1.ini");
cout << a["holas"]["hola"].c_str() << endl;
cout << a["juego"]["var"].c_str() << endl;
return 0;
}