I want to write a *.ini file in MFC. I know those typical methods with section names, key names and key values.
I`m wondering how to write a ini file which contains only a section name, an ini file like below:
...
[section]
...
I tried the function WritePrivateProfileString() with two NULL parameters; I thought it would work but failed.
Standard ini files are supposed to be in a special format, if you’re writing them in a incompatible format (which I think you are), they’re not standard ini files, but you can just write it manually using normal IO classes (
CStdioFileor similar, too long since I did MFC so I can’t remember the best way).That way you can write any data you want in any format you want.