Oh... looks like you're right. I thought the map functionality was tied to gnu. Maybe that's for C? Any I now have
Code:
#include <string>
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
typedef map<const string, const string> Properties;
int main()
{
string propsLoc = "config.properties";
Properties props;
char s[256];
string temp;
/* Read properties file into props */
ifstream ifs( propsLoc.c_str() );
while(ifs.getline(s,256))
{
temp = s;
props.insert(pair<const string, const string>(temp.substr(0,temp.find('=')),temp.substr(temp.find('=')+1)));
}
ifs.close();
}
But the insert function is giving me an error. Does this code look correct?