Created
January 16, 2014 10:40
-
-
Save usagi/8452857 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <boost/property_tree/ini_parser.hpp> | |
| int main() | |
| { | |
| using std::cout; | |
| using boost::property_tree::ptree; | |
| using boost::property_tree::write_ini; | |
| ptree p; | |
| p.put("hoge", 123); | |
| p.put("pi.float" , 3.14159265358979323846264338327950288f); | |
| p.put("pi.double" , 3.14159265358979323846264338327950288 ); | |
| p.put("pi.long double", 3.14159265358979323846264338327950288l); | |
| p.put("紅茶.アッサム" , "インド"); | |
| p.put("紅茶.ダージリン", "インド"); | |
| p.put("紅茶.ニルギリ" , "インド"); | |
| p.put("青茶.金萱" , "台湾"); | |
| p.put("青茶.鉄観音" , "中国"); | |
| p.put("緑茶.八女" , "日本"); | |
| p.put("緑茶.龍井" , "中国"); | |
| write_ini(cout, p); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment