int main( void )
{
wxFileInputStream fis( wxT("test.ini") );
if ( ! fis.Ok() )
{
printf( "ERROR: Open ini file failure!" );
return -1;
}
wxFileConfig fc( fis );
fc.SetPath( wxT("/server") );
wxString entry;
long index;
wxString value;
bool result = fc.GetFirstEntry( entry, index );
while ( result )
{
fc.Read( entry, &value );
printf( "%ld: %s=%s\r\n", index, entry.c_str(), value.c_str() );
result = fc.GetNextEntry( entry, index );
}
return 0;
}
---------------------------------------------------
通过这些代码可以发现wxFileConfig将数据读入后都处理成什么结果了。