load std::map from text file

前端 未结 2 1300
孤独总比滥情好
孤独总比滥情好 2021-01-05 11:02

This is a very simple thing, so I want to keep it as simple as it sounds. All I want is to load a bunch of key-value paires from a file, and populate them in to a map. I do

2条回答
  •  悲&欢浪女
    2021-01-05 11:19

    If you are in the MS world you can use

    GetPrivateProfileSectionNames
    GetPrivateProfileString
    WritePrivateProfileString
    

    to read from ini file or regestry. If you want to write Unicode make sure a newly created file gets the BOM of UTF16.

提交回复
热议问题