views:

1492

answers:

2

Does anyone know a good C++ class to read (and possibly also write) INI files on Windows Mobile? Ideally this class sould work on Windows mobile 2003, 5 and 6 and be public domain but other alternatives may be interesting.

+2  A: 

See this question How to read config file entries from an INI file, and this followup Help improve this INI parsing code, in which I figured out how to do the parsing myself. I can't say what I came up with is the be-all and end-all but it could be a good start.

Also, this article was mentioned Cross-platform INI configuration files.

1800 INFORMATION
Thanks! I would like to avoid reinventing the wheel, so I'm sorry I won't try to improve the parsing code. But your link with CSimpleIni, the Cross-platform INI configuration files seems to be quite promising.
Name
CSimpleIni was exactely what I was looking for.
Name
A: 

Try SimpleIni http://code.jellycan.com/simpleini/ as mentioned at CodeProject.

It is C++, single header file, template library with an MIT licence (i.e. commercial use is OK). Include it into your source file and use it. It is cross-platform, supports UTF-8 and legacy encoded files, and can read and write the INI file largely preserving comments and structure, etc. Easiest to check out the page.

It's been around for a while and is appears to be used by quite a number of people. I wrote it and continue to support it.

brofield