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

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


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


I have never parsed ini files, so I can't be too specific on this issue.
But i have one advice:
Don't reinvent the wheel as long as an existing one meets your requirements

http://en.wikipedia.org/wiki/INI_file#Accessing_INI_files
http://sdl-cfg.sourceforge.net/
http://sourceforge.net/projects/libini/
http://www.codeproject.com/KB/files/config-file-parser.aspx

Good luck :)