1

I am new to boost library and my requirement is that I want to take the configuration file as a input from the user for my application. However, the file from the user should be in ini format, if it's not then I should prompt the user about that.
So, is there any way/function in boost which can tell us if the given file is in INI format?

Thanks!

Bhagyesh Dudhediya
  • 1,800
  • 1
  • 13
  • 16
  • Have you checked [this post](http://stackoverflow.com/questions/6175502/how-to-parse-ini-file-with-boost) or [this one](http://stackoverflow.com/questions/12633/what-is-the-easiest-way-to-parse-an-ini-file-in-c?rq=1)? – pandaman1234 Jul 08 '16 at 14:56
  • Unfortunately those are related to parsing the file. I need to know the way to check if file is in INI format. – Bhagyesh Dudhediya Jul 08 '16 at 15:30
  • Well I thought the point was clear with the links: there's to "Boost INI format file checker". You can parse the files with a Boost parser and maybe deduce if there's no error that your file is in fact an INI file. Otherwise, why don't you check the extension of your file? – pandaman1234 Jul 08 '16 at 15:42

0 Answers0