So I'm working with DirectX, and I'm wanting to have most of my main configuration constants stored in an .ini file.
I used this method originally:
I combined the two classes into a single class with a single header and .cpp file, with a couple of my own tweaks. Worked like a charm! It's nice beting able to choose file/section/key/value, and declare each file as its own object.
However, when trying to implement this into windows programs, it seems to work differently.
In the case here:
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
I get errors because it's trying to pass char* pointers, but I guess the winAPI version looks for an LPCTSTR instead.
So if I change all char* to LPCTSTR, then memset and memcpy have issues, since they are looking for a char*
All that aside, is there an easy method for working with .ini files? I know they're considered outdated, but it's used heavily in the Unreal Engines, and I prefer that method of configuration over using the registry as M$ recommends.