And when I compile it, I get the following error: 'No constructor could take the source type, or constructor overload resolution was ambiguous' on the insert line.
typedef INIKey pair< string, string >;
map< INIKey, string > mData;
mData.insert( INIKey( sectionName, keyName ), value );
Why not use the make_pair() function?
backwards is your typedef
typedef pair< string, string > INIKey;
insert takes a pair of type map::value_type where value_type is a pair<key_type, data_type> in your (rather odd) case its a pair< pair<string,string>, string>. make_pair() will clean this up.
I get the impression that what you really want is
map<string, map<string,string> >
that is a map for every section from key to value's.
Sorry, I have my typedef correct in the program, just not here. I forgot that insert( ) takes a pair. Thanks.