What is the easiest way to parse an INI File in C++?


Question

I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?

1
85
8/15/2008 7:31:01 PM

Accepted Answer

You can use the Windows API functions, such as GetPrivateProfileString() and GetPrivateProfileInt().

110
8/15/2008 8:06:53 PM

If you need a cross-platform solution, try Boost's Program Options library.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon